Results 1 to 3 of 3

Thread: Resize QLayout w/ Mouse...or, a QWidget similar to QDockWidget

  1. #1
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    3

    Default Resize QLayout w/ Mouse...or, a QWidget similar to QDockWidget

    Playing around with QDockWidget, it does a lot of what I want, and some of what I don't want. I'll make this brief:

    Current application:
    Qt Code:
    1. <Several QWidgets, including a QSpacerItem>
    2. <Several QWidgets, including a QSpacerItem>
    To copy to clipboard, switch view to plain text mode 

    Basically the number of QVBoxLayout w/ widgets + the QTableWidget combinations are decided at runtime based on an environment variable. They're actually a subclassed QHBoxLayout but I figured the diagram might get too convoluted. The above works for all intents and purposes, but the user can't resize the QVBoxLayout (width) to make it skinnier as they see fit... not without making some goofy controller to resize it manually. I try to come up with this one the best, but it seems like a lot of work that shouldn't be necessary.

    From what I've seen, QDockWidget is definitely not what I want, as it focuses on a single QWidget, and is limited to one per QMainWindow (Amirite?). But, it's nice to slap a QDialog or QFrame in there, and have the user resize it. Is there another Widget that does something similar to that?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Resize QLayout w/ Mouse...or, a QWidget similar to QDockWidget

    See QSplitter.

  3. The following user says thank you to Lykurg for this useful post:

    kiss-o-matic (24th December 2009)

  4. #3
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    3

    Default Re: Resize QLayout w/ Mouse...or, a QWidget similar to QDockWidget

    Just nothing but pure love around here. Thanks man!

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.