Results 1 to 5 of 5

Thread: How to create a top-level widget without taskbar entry but with maximize button?

  1. #1
    Join Date
    Oct 2008
    Posts
    20
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb How to create a top-level widget without taskbar entry but with maximize button?

    The problem is that QDialog in Qt4 has no maximize button and I don't know how to add one. Thanks in advance.

    P.S. Mostly I'm going to use it on x11 and Mac.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to create a top-level widget without taskbar entry but with maximize button?

    J-P Nurmi

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to create a top-level widget without taskbar entry but with maximize button?

    an example
    Qt Code:
    1. ...
    2. QProgressDialog pd("sdfsdf", "sdfsdf", 0, 100, this);
    3. pd.setWindowFlags(pd.windowFlags() | Qt::WindowMaximizeButtonHint);
    4. pd.exec();
    5. ...
    To copy to clipboard, switch view to plain text mode 
    PS. look at QTDIR/examples/widgets/windowflags
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. #4
    Join Date
    Oct 2008
    Posts
    20
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to create a top-level widget without taskbar entry but with maximize button?

    It might be caused by x11 but window hints does not work at all in the windowflags example. Simply a dialog has no minimize and maximize buttons; but a window has them.

  5. #5
    Join Date
    Oct 2008
    Posts
    20
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to create a top-level widget without taskbar entry but with maximize button?

    Seems like there's no window type flag, except Qt::Window, that allows minimize and maximize btns.

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.