[SOLVED] Help on QTabWidget
-
wrote on 26 Jul 2011, 15:55 last edited by
Yes the same... i want to do the same thing from my main window at runtime..
-
wrote on 26 Jul 2011, 18:43 last edited by
Then you have to fully inmplement it on your own. customize the widgets (create derived classes) or install event filter (from the main window to the TabWidget) and overwrite the mouse press, mouse release and mouse move events.
There is no build in mechanism to achieve this.
-
wrote on 27 Jul 2011, 08:02 last edited by
Thank you for your valuable input..
-
wrote on 27 Jul 2011, 08:40 last edited by
The widget used by QMainWindow is a QSizeGrip. Probably the best and easiest way to use it is to actually have your QTabWidget inside a QMainWindow with its status bar shown and setSizeGripEnabled(true) on the status bar.
-
wrote on 27 Jul 2011, 10:18 last edited by
Would it not be enough to use QSplitter?
-
wrote on 27 Jul 2011, 10:27 last edited by
Wait a second, they're quite different controls :-)
Now I'm not sure which one exactly we're talking about. -
wrote on 27 Jul 2011, 10:30 last edited by
this would only move one part of it, but not make it resizable in all directions like in designer...
-
wrote on 27 Jul 2011, 11:23 last edited by
No, true, but then again, I don' t know the exact requirements of M_31 :-) Perhaps two QSplitters would also be enough. It all depends on what he needs to achieve (as opposed to the description of how he currently tries to achieve it.) It may be that he actually needs the kind of resize handles that you have in Designer, but I honestly doubt it. You don't see such a UI in many end-user applications. If M_31 only wanted to achieve resizing the tab widget, and only knew of the way Qt Designer presents that, then suggesting alternatives may be valuable. QSizeGrip may be what he needs, but then again: it may not be.
Anyway, lets hear from M_31 what he is up to really.
-
wrote on 27 Jul 2011, 13:57 last edited by
Thanks to all for your advice.
Now i finally used QSplitter to achive my task..
I have used 2 splitter to work like tabwidget ( with 2 tabs)..& even now i can resize the same with the help of QSplitter control.Instead of tab buttons, i have used Toolbar on the top of Splitter Window..
:)Finally i achived my task...
-
wrote on 27 Jul 2011, 17:20 last edited by
Please be so kind to add [Solved] to the beginning of the thread title if you've got it working.
13/13