Results 1 to 11 of 11

Thread: Dialog and minimize, maximize buttons

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Posts
    41
    Thanks
    6
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Dialog and minimize, maximize buttons - partially succseed

    You should set "Qt::CustomizeWindowHint" for window flags,
    Qt Code:
    1. setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
    To copy to clipboard, switch view to plain text mode 
    Last edited by srazi; 24th November 2010 at 12:57. Reason: spelling corrections

  2. #2
    Join Date
    Sep 2010
    Posts
    62
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Dialog and minimize, maximize buttons

    Nice idea, but sorry...

    I've already checked it. on Linux ( SuSE 11.2) the minimize and maximize buttons ale still visible. The close button and context help button disappear.

    Anyway thanks for the hint!
    me

  3. #3
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Dialog and minimize, maximize buttons

    hi,
    In Debian its working. It should work with windowflags ,
    try Qt::FramelessWindowHint and if u want to show a title ,add a QLabel and show ur title.

    Or Try window styles, like motif,kde etc using QStyle

    Thnks
    Bala

  4. #4
    Join Date
    Jul 2010
    Posts
    41
    Thanks
    6
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Dialog and minimize, maximize buttons

    Quote Originally Posted by lotek View Post
    Nice idea, but sorry...

    I've already checked it. on Linux ( SuSE 11.2) the minimize and maximize buttons ale still visible. The close button and context help button disappear.

    Anyway thanks for the hint!
    me
    I used this and it works with Ubuntu 9.10 and 10.04,
    Please when you found the solution, write it here.

  5. #5
    Join Date
    Apr 2010
    Posts
    21
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Thumbs up Re: Dialog and minimize, maximize buttons

    Works well in Ubuntu 10.04

    All buttons visible and all buttons enabled: setWindowFlags(Qt::Tool)
    All buttons visible, close and maximize buttons enabled, minimize button disabled: setWindowFlags(Qt::Tool | Qt::WindowTitleHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint)
    All buttons visible, maximize button enabled, close and minimize disabled: setWindowFlags(Qt::Tool | Qt::WindowTitleHint | Qt::WindowMaximizeButtonHint | Qt::CustomizeWindowHint)
    Only close button is visible and enabled setWindowFlags(Qt::Tool | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint)
    No buttons in title bar: setWindowFlags(Qt::Tool | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint)

  6. #6
    Join Date
    Feb 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Dialog and minimize, maximize buttons

    If i am understanding this problem correctly then this works with Qt4 on Ubuntu 10.10

    w.setWindowFlags(Qt::Tool);

    add that line before w.show() in your main.cpp and all you will have is the close button

    HTH
    TpwUK

Similar Threads

  1. Disable the minimize, maximize,close buttons
    By qtlinuxnewbie in forum Newbie
    Replies: 10
    Last Post: 25th February 2010, 10:18
  2. how to remove maximize minimize close
    By tsuibin in forum Qt Programming
    Replies: 8
    Last Post: 2nd April 2009, 18:28
  3. Replies: 1
    Last Post: 21st February 2009, 14:59
  4. User has not minimize or maximize buttons
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 6th October 2007, 19:23
  5. Replies: 3
    Last Post: 25th March 2006, 06:15

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
  •  
Qt is a trademark of The Qt Company.