Results 1 to 5 of 5

Thread: QDialog in the taskbar (Win32)

  1. #1
    Join Date
    Jan 2006
    Location
    Leiden, the Netherlands
    Posts
    43
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QDialog in the taskbar (Win32)

    Hello,

    I have a QDialog, that is shown modal using QDialog::exec(). On my Win32 system, I get an item in the taskbar for this dialog. I always believed that if you set your mainwindow as a parent, this taskbar item dissapears.

    I do the following:

    Qt Code:
    1. QWinWidget winWidget(hWndMain); //WinWidget containing my Win32 mainwindow HWND
    2.  
    3. QMyDialog dlg(&winWidget); //My dialog, a child of winWidget
    4. dlg.exec();
    To copy to clipboard, switch view to plain text mode 

    Is there any other way of hiding the taskbar item for my QDialog?

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: QDialog in the taskbar (Win32)

    Could you try to remove the system menu from your dialog? I remember that I have read something that a taskbar entry only appears when a certain element from the titlebar is visible . You can hide the system menu by removing Qt::WindowSystemMenuHint

    from windowFlags:

    http://doc.trolltech.com/4.1/qwidget...ndowFlags-prop
    It's nice to be important but it's more important to be nice.

  3. #3
    Join Date
    Jan 2006
    Location
    Leiden, the Netherlands
    Posts
    43
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDialog in the taskbar (Win32)

    It doesn't make a difference.

  4. #4
    Join Date
    Feb 2006
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDialog in the taskbar (Win32)

    Any update on this topic?

    I have a QWidget that I don't want to appear in the Taskbar. For a while I was using the Qt::Tool flag, but that can have weird effects when you try to use -that- widget as a parent of QDialogs (possibly of all widgets)?

    Anyway, I tried using the Qt::WindowSystemMenuHint as mentioned above and it did not work for me either.

    Thanks,
    Daniel

  5. #5
    Join Date
    Jan 2006
    Location
    Leiden, the Netherlands
    Posts
    43
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDialog in the taskbar (Win32)

    My problem was forgetting to pass the pointer to the mainwindow to the QDialog constructor, like this

    <code>

    QMyDialog(QWidget * pParent) :
    QDialog(pParent)
    </code>

    In stead, I passed NULL, which is not so smart of course...

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

    frankiefrank (28th April 2011)

Similar Threads

  1. Resizing a QDialog to the content size
    By Nyphel in forum Qt Programming
    Replies: 8
    Last Post: 15th March 2007, 09:16
  2. Parentless window with no taskbar entry
    By durbrak in forum Qt Programming
    Replies: 6
    Last Post: 14th December 2006, 14:46

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.