PDA

View Full Version : Can't get Qt App to look same under Windows and Linux - Need help



FToe
1st June 2012, 17:29
I have an Qt application that has a main window with dialogs that pop up full screen. Each dialog can pop up other full screen dialogs that cover up the preceding dialogs. Closing a dialog returns to the dialog that was hidden underneath it.

This works really nicely under Windows.

When I compile it for Linux the dialog boxes stack one below the other with the title bar of the previous dialog visible. (See attached image) I want each dialog to hide the previous ones, like they do under Window Qt.

Why is this behavior different under Linux? How can I make this work? I am using running under Ubuntu Linux

Thanks

FToe
1st June 2012, 22:38
SOLUTION
-----------------

I fixed the Linux display issue by putting the following line in the Constructor for the Dialogs:

this->move(parent->x(), parent(y));

This line does not do any harm under Windows (it does nothing), but makes the dialogs stack properly under Linux

wysota
2nd June 2012, 01:32
You should just use QStackedWidget instead of a series of separate windows.