PDA

View Full Version : Toolbars "out" of main window



jpujolf
3rd December 2009, 17:13
Hi all,

I'm working on a framewrok to ease creation of big projects. It has a QMainWindow for the "application launcher" that shows a menu and some interesting data.

From this menu, you can take actions : data mining of database through grids, launch processes / transactions, enter/edit data, etc. Imagine a big ERP, so that's my current project...

I have to show a QToolBar with some icons on top of most of the windows, but if I use a QDialog I have to layout them manually ( OK, no problem ), but they show very different from QMainWindow ( doesn't have the little vertical dotted bar to stretch them, basically )

It's a normal behaviour ? I'm doing something the wrong way? :confused:

Anyway, the problem will be solved making ALL actual QDialogs be QMainWindow. It's not a problem, because actually I use QtDesigner to design windows, and a QUiLoader to load them into the app. Then I can load it dinamically changing all I want...

And I'm actually adding buttons, Toolbars and statusbars to the forms, i.e.

But it's a good idea to have more than 1 QMainWindow ?

wysota
3rd December 2009, 23:29
Yes, it's a normal behaviour - dialog windows don't have toolbars. And yes, you can have more than one "main window" in your application.