PDA

View Full Version : Setting the starting position of Main Window



vishal.chauhan
20th December 2006, 12:12
Hi All,

I m using Qt 4.2.2 on my Mac Intel.
I have made a mainWindow form named as MainForm.
when I m running this form it shows the MainForm to the right.
I want to show it on the Top Left corner.

I donot know how to do it.

If anyone knows then plz plz reply.

Thanks
Vishal

jpn
20th December 2006, 12:17
Use QWidget::move() or QWidget::setGeometry() to move it there. You can get the screen geometry from QDesktopWidget.

See also Window Geometry (http://doc.trolltech.com/4.2/geometry.html) documentation.

Other useful related functions:

QWidget::saveGeometry()
QWidget::restoreGeometry()
QMainWindow::saveState()
QMainWindow::restoreState()