Results 1 to 3 of 3

Thread: full screen on specified monitor

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2008
    Posts
    5
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default full screen on specified monitor

    I am trying to send a QWidget full screen to a specific monitor.

    Qt Code:
    1. QDesktopWidget *desktop = QApplication::desktop();
    2.  
    3. QRect rect = desktop>screenGeometry(screen_number);
    4.  
    5. setGeometry(rect);
    6.  
    7. setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowMaximized))| Qt::WindowFullScreen);
    To copy to clipboard, switch view to plain text mode 


    This works, but when I restore from fullScreen using showNormal() the widget is full screen size but positioned at 0,0 so there is no titlebar.
    I can manually resize it but there is still no title bar until I force a resize() with the mouse.

    Presumably showFullScreen() sets some previous size to restore to - that I'm not setting?

    Alternatively I tried moving the widget to the position on the second display returned by screenGeometry() and then calling showFullScreen() but this maximises it on the original display.

    Whats the procedure for maximising on a specific display and then returning to the previous window size/position?
    Last edited by mgb_qt; 30th July 2010 at 17:02.

  2. The following user says thank you to mgb_qt for this useful post:


  3. #2
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: full screen on specified monitor

    Quote Originally Posted by mgb_qt View Post
    Whats the procedure for maximising on a specific display and then returning to the previous window size/position?
    Why not let the user do it via the window manager, or is there some reason to do it automatically?

  4. The following user says thank you to MTK358 for this useful post:


  5. #3
    Join Date
    Jan 2010
    Posts
    7
    Thanked 1 Time in 1 Post

    Default Re: full screen on specified monitor

    Yes, there's a specific external monitor that the app has to be drawn onto.

  6. The following user says thank you to mgb for this useful post:


Similar Threads

  1. Full Screen Double Click?
    By winston2020 in forum Qt Programming
    Replies: 4
    Last Post: 3rd June 2010, 13:37
  2. Open image in full screen
    By jeetu_happy in forum Qt Programming
    Replies: 3
    Last Post: 23rd January 2007, 10:03
  3. Starting application in full screen
    By safknw in forum Qt Programming
    Replies: 3
    Last Post: 12th May 2006, 19:02
  4. how to display a window full screen??
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2006, 13:07
  5. how to make the form full screen
    By shrikarcse in forum Qt Tools
    Replies: 1
    Last Post: 24th April 2006, 16:30

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.