Results 1 to 6 of 6

Thread: Disable window menu on a QDialog

  1. #1
    Join Date
    Feb 2009
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Disable window menu on a QDialog

    How can we remove the window menu in the title bar of a QDialog?

  2. #2
    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: Disable window menu on a QDialog

    take a look at QTDIR/examples/widgets/windowflags.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Disable window menu on a QDialog

    in your dialog constuctor use this flag ..
    MainWindow::MainWindow(QWidget *parent)
    : QDialog(parent, Qt::FramelessWindowHint)

  4. #4
    Join Date
    Feb 2009
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Disable window menu on a QDialog

    This will remove the title bar from the dialog. I need the title bar in dialog. But the window menu is not needed.

  5. #5
    Join Date
    Oct 2010
    Location
    Bangalore
    Posts
    14
    Qt products
    Qt4 Qt/Embedded

    Default Re: Disable window menu on a QDialog

    I've got same problem. I too want to disable the menu display when right clicked on the title bar of a dialog, If anybody has got any solution please post it.
    Thanks

  6. #6
    Join Date
    Feb 2007
    Posts
    39
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Disable window menu on a QDialog

    Same problem here
    I was able to install an event filter for right button behavior in the qdialog but it doesn't work when the right button is pressed over the title bar of qdialog..
    Can someone help ? Thanks.

Similar Threads

  1. Disable context menu in QWebView
    By ivi2501 in forum Qt Programming
    Replies: 3
    Last Post: 26th August 2008, 09:59
  2. Double click resize window disable
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2008, 11:35
  3. Replies: 4
    Last Post: 25th June 2007, 20:40
  4. Replies: 4
    Last Post: 4th June 2007, 12:07
  5. Replies: 1
    Last Post: 9th February 2007, 09:41

Tags for this Thread

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.