Results 1 to 2 of 2

Thread: empty space in QGridLayout

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2006
    Posts
    96

    Default empty space in QGridLayout

    Hi:

    Qt Code:
    1. QSpacerItem *space = new QSpacerItem(1,1);
    2.  
    3. /* layouts */
    4. QGridLayout *sessionLayout = new QGridLayout();
    5. sessionLayout->addWidget(hostLabel, 0, 0);
    6. sessionLayout->addWidget(hostText, 0, 1);
    7. sessionLayout->addWidget(portLabel, 1, 0);
    8. sessionLayout->addWidget(portText, 1, 1);
    9. sessionLayout->addWidget(connectButton, 2, 0);
    10. sessionLayout->addWidget(closeButton, 2, 1);
    To copy to clipboard, switch view to plain text mode 

    What I want to do is this:
    - I have 4 rows and 3 columns
    - I need 5 rows and 4 columns where the last line + column consist of empty spaces (as big as other rows/columns)

    - the problem is I don't know how to do it with QSpaceItem...I added it to sessionLayout with QGridLayout::addItem() but the problem is the size...

    so any other idea how to do this efficiently?
    Last edited by eleanor; 4th July 2008 at 01:49.

Similar Threads

  1. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11
  2. QTableWidget click in empty space results in error?
    By Giel Peters in forum Qt Programming
    Replies: 4
    Last Post: 21st January 2006, 00:07

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
  •  
Qt is a trademark of The Qt Company.