Results 1 to 3 of 3

Thread: qdialog and taskbar

  1. #1
    Join Date
    May 2010
    Posts
    9
    Qt products
    Platforms
    Windows

    Default qdialog and taskbar

    hello!
    i have some question that as i see appears many times, but nevertheless i can't find the solution for me.

    i have some widget, and the button in it, and when i press this button i want to appear some other widget, frameless and not
    showing in the taskbar.

    i can achieve two results - frameless or 'taskbarless' =)

    1 -frameless - everything is ok, but it of course appears in the taskbar

    (code in PyQt4)
    Qt Code:
    1. self.add_new_light_widget = QWidget()
    2. self.add_new_light_widget.setWindowFlags(Qt.WindowFlags(Qt.FramelessWindowHint))
    To copy to clipboard, switch view to plain text mode 

    2 - 'taskbarless' - now it is the dialog with the parent of main widget, so it doesbn't appears in the taskbar

    Qt Code:
    1. self.add_new_light_widget = QDialog(self)
    2. self.add_new_light_widget.setWindowTitle("About")
    3. self.add_new_light_widget.setWindowFlags(Qt.WindowFlags(Qt.Dialog))
    To copy to clipboard, switch view to plain text mode 

    but if i use
    Qt Code:
    1. self.add_new_light_widget.setWindowFlags(Qt.WindowFlags(Qt.CustomizeWindowHint))
    To copy to clipboard, switch view to plain text mode 
    (or frameless hint) my new widget will not show!

    please help me - where am i wrong?
    thank you!

  2. #2
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: qdialog and taskbar

    I don't use pyQt, but maybe this will help You. In Qt I do:

    Qt Code:
    1. infoDialog* info = new infoDialog( this ); //parent here is important, that way qdialog don't show on task-bar
    2. info->setWindowFlags( Qt::Dialog | Qt::WindowCloseButtonHint );//reset flags, to remove [?] icon, only [x] icon on window
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    May 2010
    Posts
    9
    Qt products
    Platforms
    Windows

    Default Re: qdialog and taskbar

    thank you)
    yes, parenting dialog helps avoiding the taskbar appearance, but in this case the title line with the close button is shown - and i want frameless widget =)
    the solution i found is
    Qt Code:
    1. self.add_new_light_widget.setWindowFlags(Qt.WindowFlags(Qt.Tool)|Qt.WindowFlags(Qt.SplashScreen))
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Widget on top, but below the taskbar.
    By Ewyx in forum Newbie
    Replies: 0
    Last Post: 3rd November 2009, 21:54
  2. closing a Qdialog called from a Qdialog
    By OverTheOCean in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 08:02
  3. Program does not appear in TaskBar
    By Arsenic in forum Qt Programming
    Replies: 2
    Last Post: 21st July 2008, 21:06
  4. QT taskbar notification
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 4th December 2007, 20:41
  5. QDialog in the taskbar (Win32)
    By Arthur in forum Qt Programming
    Replies: 4
    Last Post: 28th February 2006, 16:34

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.