My problem: I have a succession of steps, QDialogs. Each new dialog should be shown on the center of previous dialog, which has just been hidden. (I know, not an elegant design, but it is too late now).

Something like:

Qt Code:
  1. QDialog dialog1(mainform);
  2. dialog1.exec();
  3. QDialog dialog2(dialog1);
  4. dialog2.exec();
To copy to clipboard, switch view to plain text mode 

Under Windows, it is OK. Under X11, dialog2 is a bit upper (I think the reason is that after hiding dialog1, it loses its decorations).

How could this be solved, keeping code changes to the minimum?