PDA

View Full Version : Resize QLayout w/ Mouse...or, a QWidget similar to QDockWidget



kiss-o-matic
24th December 2009, 07:17
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:


QHBoxLayout
QVBoxLayout
<Several QWidgets, including a QSpacerItem>
QTableWidget
QVBoxLayout
<Several QWidgets, including a QSpacerItem>
QTableWidget


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?

Lykurg
24th December 2009, 09:01
See QSplitter.

kiss-o-matic
24th December 2009, 10:05
Just nothing but pure love around here. Thanks man!