PDA

View Full Version : Designer and QWorkspace



brcain
14th September 2006, 17:25
Hello,

Any reason why Designer was "designed" such that you can't specify a QWorkspace as the central widget for a QMainWindow?

Since this is the case, what is the orthodox way to use Designer (rather than coding by hand) to produce a main UI such that it uses the QWorkspace. Should I write a pre-code-generation-script that automatically converts the contents of the UI file from:

<widget class="QWidget" name="centralwidget" /
to

<widget class="QWorkspace" name="centralwidget" /

Thanks,
Ben

jacek
14th September 2006, 17:32
Simply create an empty form using the Main Window template, save it as a new template and change QWidget to QWorkspace in the .ui file of that template. From now on, using that template, you can create main windows with a QWorkspace as the main widget.

brcain
14th September 2006, 17:38
Ignoring the obvious ... doh! :o