Results 1 to 10 of 10

Thread: QTableView Splitter and pictures

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: QTableView Splitter and pictures

    You said : //next, add the splitter to some container widget.
    I was meaning a layout, in case you have one. If the splitter is the central widget of your window then you do not need this step.

    The form now comes up with the view and the label only a few pixels in size.
    This is because your splitter has no layout manager to handle its size and position.
    Either set the splitter as the central widget of your main window or if you use a QDialog instead, then set a QHorizontalLayout as the dialog's layout and use layout->addWidget(splitter), causing it to resize to the full client area of the dialog.

    EDIT: if you want more control over the splitter's widget sizes the I suggest using QSplitter::setSizes() or QSplitter::setStretchFactor().
    Last edited by marcel; 29th December 2007 at 08:52.

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.