<p>Is there a way to specify a child's initial window position in Qt?</p>

<p>I have an application that runs on Linux and Windows and it looks like the default behavior of Qt lets the Window Manager determine the placement of the child windows.   </p>

<p>On Windows, this is in the center of the screen the parent is on which seems reasonable.   </p>

<p>On Linux, in GNOME (metacity) it is always in the upper left-hand corner which is annoying.  I can't find any window manager preferences for metacity that allow me to control window placement so I would like to override that behavior.</p>

[{'answer_id': 30597, 'author': 'kokos', 'author_id': 1065, 'author_profile': 'https://Stackoverflow.com/users/1065', 'pm_score': 3, 'selected': True, 'text': '<p><a href="http://doc.qt.io/qt-4.8/qwidget.html#geometry-prop" rel="nofollow noreferrer">Qt Widget Geometry</a></p>\n\n<p>Call the move(x, y) method on the child window before show(). The default values for x and y are 0 so that\'s why it appears in the upper left-hand corner.<br>\nYou can also use the position of the parent window to compute a relative position for the child.</p>\n'}, {'answer_id': 163631, 'author': 'Parker Coates', 'author_id': 4757, 'author_profile': 'https://Stackoverflow.com/users/4757', 'pm_score': 0, 'selected': False, 'text': "<p>Generally, I'd recommend not forcing window positions unless your application has some very special windowing requirements. It's the window manager's job to determine where new windows are put and most of them do a good job. If MetaCity isn't picking a good position, then that's its problem.</p>\n\n<p>If you do your own window placement you may get a better result then what a poor window manager would give, but you'll also miss out on the intelligent window placement algorithms available in more advanced window managers.</p>\n"}]
['https://Stackoverflow.com/questions/30521', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2897/']