PDA

View Full Version : Replacing Central Widget in Designer



Max Yaffe
9th July 2007, 16:33
I'm having a problem with Designer and the Designer plugin to Visual Studio.

I'm trying to replace the central Widget on a (a QWidget) docking QMainWindow with a QTabWidget. It's easy in code but is there any way to do this in Designer?

Thanks,
Max

jpn
10th July 2007, 22:37
I'm trying to replace the central Widget on a (a QWidget) docking QMainWindow with a QTabWidget. It's easy in code but is there any way to do this in Designer?
Do you mean setting QTabWidget as central widget? It's not possible from Designer. A main window project always has a plain QWidget as central widget. However, it's fairly possible by editing the .ui file by hand. Simply remove the "centralWidget" element which wraps the tab widget.

Michiel
11th July 2007, 12:41
Or, if you want to do everything in Designer, you can just use the QWidget and make the QTabWidget stretch all over it. You'll never notice the difference.