Results 1 to 2 of 2

Thread: Setting the starting position of Main Window

  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Setting the starting position of Main Window

    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

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Setting the starting position of Main Window

    Use QWidget::move() or QWidget::setGeometry() to move it there. You can get the screen geometry from QDesktopWidget.

    See also Window Geometry documentation.

    Other useful related functions:
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    vishal.chauhan (20th December 2006)

Similar Threads

  1. Main window with custom buttons ?
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2006, 06:32
  2. Replies: 5
    Last Post: 4th August 2006, 23:44
  3. Replies: 4
    Last Post: 29th March 2006, 23:44
  4. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21
  5. Main window
    By Michiel in forum Qt Tools
    Replies: 1
    Last Post: 20th March 2006, 23:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.