Results 1 to 2 of 2

Thread: Showing QMainWindow Title bar

  1. #1
    Join Date
    Aug 2009
    Posts
    47
    Qt products
    Qt4 Qt/Embedded PyQt3 PyQt4
    Platforms
    Unix/X11 Symbian S60
    Thanks
    6
    Thanked 1 Time in 1 Post

    Question Showing QMainWindow Title bar

    Hi,

    in my application i need to show the title bar after some time i need to hide the title bar for that i am using following code
    "HIding the title bar"
    Qt Code:
    1. this->setWindowFlags(Qt::MSWindowsFixedSizeDialogHint);
    2. this->setWindowFlags(Qt::CustomizeWindowHint);
    3. this->setWindowFlags(Qt::FramelessWindowHint);
    To copy to clipboard, switch view to plain text mode 

    "Showing the title bar"
    Qt Code:
    1. Qt::WindowFlags flags=windowFlags();
    2. flags^=Qt::WindowMinimizeButtonHint;
    3. setWindowFlags(flags);
    To copy to clipboard, switch view to plain text mode 

    But hiding works fine for me ,show make the application crashes

    Regards
    SivaKumar.N
    Last edited by high_flyer; 10th May 2011 at 10:54. Reason: code tags
    Kavin

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Showing QMainWindow Title bar

    on which line of code exactly does the code crash?
    Run it in a debugger to see.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 2
    Last Post: 22nd November 2010, 21:24
  2. How to remove QMainWindow's title and border
    By meraj ansari in forum Qt Programming
    Replies: 1
    Last Post: 13th May 2010, 18:22
  3. Title Bar in QMainWindow
    By kavinsiva in forum Newbie
    Replies: 1
    Last Post: 24th September 2009, 14:51
  4. Replies: 4
    Last Post: 19th February 2009, 17:56
  5. Showing QMainWindow without showing a child QWidget
    By discostu in forum Qt Programming
    Replies: 3
    Last Post: 4th March 2007, 10:03

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.