Results 1 to 3 of 3

Thread: Getting rid of Dialog Title Bar

  1. #1
    Join Date
    Jan 2010
    Posts
    40
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Getting rid of Dialog Title Bar

    I have several different dialog forms in my application. I want to display them without the title bar. It is a touchscreen interface and the title bar and control box just get in the way. I can get rid of the title bar in the designer of Qt Creator, but when the form previews, or displays in the app, Qt puts the title bar back again, with a title of "Dialog". My main window displays without a title bar, no problem. I've scoured the help docs and Googled until my eyes bleed but I can't figure out how to do this. Help, please?

  2. #2
    Join Date
    Jun 2010
    Location
    Salatiga, Indonesia
    Posts
    160
    Thanks
    11
    Thanked 32 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Re: Getting rid of Dialog Title Bar

    How about using QWidget::setWindowFlags(Qt::WindowFlags) ?

    In your custom dialog constructor, add this code:
    Qt Code:
    1. setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2010
    Posts
    40
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Getting rid of Dialog Title Bar

    That did the trick. Thank you. You are too cool.

Similar Threads

  1. QDockWidget-title
    By moowy in forum Qt Programming
    Replies: 18
    Last Post: 23rd April 2014, 21:13
  2. closing child dialog closes parent dialog
    By sparticus_37 in forum Newbie
    Replies: 2
    Last Post: 28th May 2010, 20:46
  3. How to blur parent dialog when child dialog is displayed
    By abhilashajha in forum Qt Programming
    Replies: 4
    Last Post: 10th June 2009, 14:01
  4. QMessageBox - no dialog title on Mac OS?
    By will49 in forum Qt Programming
    Replies: 1
    Last Post: 8th October 2007, 15:07
  5. window title bar
    By moowy in forum Qt Programming
    Replies: 4
    Last Post: 21st September 2006, 17:56

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.