Results 1 to 2 of 2

Thread: Spanned Item Spacing on Empty Columns

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    16
    Thanks
    1
    Platforms
    Windows

    Default Spanned Item Spacing on Empty Columns

    Using the following code,

    " QLabel* id_field[4];
    id_field[0] = new QLabel("Search Fields");
    id_field[1] = new QLabel("Comparison");
    id_field[2] = new QLabel("Value(s)");
    id_field[3] = new QLabel("Combination");
    id_field[4] = new QLabel("Adv Combinations");

    m_Layout->setSpacing(0);

    m_CombinationField = new QLineEdit();

    m_Layout->addWidget(id_field[0],0,0);
    m_Layout->addWidget(id_field[1],0,15);
    m_Layout->addWidget(id_field[2],0,16);
    m_Layout->addWidget(id_field[3],0,18);

    //m_Layout->addWidget(id_field[4],47,0);
    m_Layout->addWidget(m_CombinationField, 48, 0, 1, 19);
    //m_Layout->addWidget(m_CombinationField, 48, 0, 1, 2);

    m_SearchArea->setLayout( m_Layout );
    "

    I'm trying to span a QLineEdit across the majority of a 20 column QGridLayout. However, when I do this, it tries to apply QLayout's spacing on each one of the empty columns whereas they previously would not display. This is resulting in huge gaps in my display. To test this, I set my spacing to 0 and this problem disapeared but this is not an ideal solution.

    What I'm looking for is a way to disable inter-column spacing on a QLineEdit across a span so it treats those empty columns as if they weren't even there while still lining up the LineEdit with the outer edges of my 0 and 18 index columns.

    Pictures of the problem included as an attachment...
    Attached Images Attached Images

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.