Results 1 to 2 of 2

Thread: Do not let QDialog minimize on secondary screen

  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    69
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Do not let QDialog minimize on secondary screen

    Hi,

    I have an application that is shown on the main screen and it also have a widget that is showed on a secondary screen calling "showFullScreen".

    The problem is that when the user minimizes the mainWindow, the widget on the second screen is also minimized and I want to avoid that.
    I want this widget to be shown all the time like a top window.

    I have tryied "setWindowFlags(Qt::WindowStaysOnTopHint)" but it does not show the widget.
    I also have tryied to catch the hide event of the widget and accept it, but it is still minimized.

    Any idea?

    Thanks,
    Òscar Llarch i Galán

  2. #2
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    69
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Do not let QDialog minimize on secondary screen

    Hi,

    Finally I found a solution:
    Make the widget(or dialog in my case) to do not have a parent
    Then the problem was that when I close the main window, the application does't close and this is because there is still a window to close("quitOnLastWindowClosed").
    To solve this second problem you have to redefine the "closeEvent" on the mainWindow and close the widget(or dialog) there.

    I hope it helps other people with same problem.
    Òscar Llarch i Galán

Similar Threads

  1. MacOSX Secondary Click
    By litheon in forum Newbie
    Replies: 1
    Last Post: 30th April 2012, 16:52
  2. Stylesheet secondary effects
    By frank100 in forum Qt Programming
    Replies: 3
    Last Post: 25th January 2011, 22:41
  3. Debuging a secondary thread
    By ^Nisok^ in forum Newbie
    Replies: 5
    Last Post: 29th April 2009, 08:14
  4. Screen get white on minimize?
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 11th August 2008, 21:22
  5. Snap/Dock QDialog to the edge of the screen
    By durbrak in forum Qt Programming
    Replies: 5
    Last Post: 14th December 2006, 04:41

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.