Results 1 to 3 of 3

Thread: full screen on specified monitor

Threaded 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 16:02.

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


Similar Threads

  1. Full Screen Double Click?
    By winston2020 in forum Qt Programming
    Replies: 4
    Last Post: 3rd June 2010, 12:37
  2. Open image in full screen
    By jeetu_happy in forum Qt Programming
    Replies: 3
    Last Post: 23rd January 2007, 09:03
  3. Starting application in full screen
    By safknw in forum Qt Programming
    Replies: 3
    Last Post: 12th May 2006, 18:02
  4. how to display a window full screen??
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2006, 12:07
  5. how to make the form full screen
    By shrikarcse in forum Qt Tools
    Replies: 1
    Last Post: 24th April 2006, 15: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.