[Qt-interest] multiple qmainwindow problem
Konrad Rosenbaum
konrad at silmor.de
Tue Feb 15 13:06:50 CET 2011
On Tue, February 15, 2011 08:57, hazreti coolcuzu wrote:
> The problem is, if I instantiate class2object with NULL parent widget, it
> becomes passive. I can't touch it with my mouse, move it or do anything.
> When I close class1 object, class2object becomes active and I can work on
> it.
This sounds like you have somehow managed to make one or both windows
modal or you have a dialog open too. Normally two QMainWindows would
behave independently.
How did you instantiate class1object?
> If I instantiate class2object with parent widget set to class1object as:
> class2object can get active, I can work on two main windows. But, when I
> press ALT + TAB, I can't move between the windows, they don't behave like
> two different applications.
Because in this case you have made class2object a sub-window of
class1object. Like every little child it is totally dependent on its
parent... ;-)
Konrad
More information about the Qt-interest-old
mailing list