Results 1 to 6 of 6

Thread: [QT3 + XP] How to avoid the windows title bar

  1. #1
    Join Date
    Jan 2006
    Location
    Grenoble, France
    Posts
    165
    Thanks
    106
    Qt products
    Qt4
    Platforms
    Windows

    Question [QT3 + XP] How to avoid the windows title bar

    Hi,

    Simple question I guess.

    I try to program a form (without designer) where the top status bar of windows would not be there. Up to me to code minimize, maximize and close buttons.

    The idea is to use a background image without the usual top status bar of windows.

    I tried to use the class QMainWindow but it shows this status bar.

    Is there a way to avoid that ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [QT3 + XP] How to avoid the windows title bar

    You could try passing "Qt::WStyle_Customise | Qt::WStyle_Splash" flags to the widget constructor.

  3. #3
    Join Date
    Jan 2006
    Location
    Grenoble, France
    Posts
    165
    Thanks
    106
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: [QT3 + XP] How to avoid the windows title bar

    I get the following compile error :
    29 C:\root\Dev-Cpp\qt-3\My Examples QT3\sms\application.cpp `WStyle_Customise' is not a member of `Qt'

    Maybe this is a QT4 feature ?

    Code:
    ApplicationWindow::ApplicationWindow()
    : QMainWindow( 0, "example application main window", Qt::WStyle_Customise | Qt::WStyle_Splash | WDestructiveClose | WGroupLeader )
    {
    }

    sorry i don't know how to embed code in the post

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [QT3 + XP] How to avoid the windows title bar

    Quote Originally Posted by incapacitant
    Maybe this is a QT4 feature ?
    No, just a typo --- it should be Qt::WStyle_Customize.

    Quote Originally Posted by incapacitant
    i don't know how to embed code in the post
    You can use [ code ] tags. Like this:
    Qt Code:
    1. // some code
    To copy to clipboard, switch view to plain text mode 

  5. The following user says thank you to jacek for this useful post:

    incapacitant (2nd March 2006)

  6. #5
    Join Date
    Jan 2006
    Location
    Grenoble, France
    Posts
    165
    Thanks
    106
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: [QT3 + XP] How to avoid the windows title bar

    it works fine, thanks

    for embedding code in the post it is not clear still.
    should i enter
    Qt code:
    some code?

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [QT3 + XP] How to avoid the windows title bar

    Quote Originally Posted by incapacitant
    for embedding code in the post it is not clear still.
    should i enter
    Qt code:
    some code?
    Type: [ code ] some code [/ code ] (without spaces in []) or click "#" above the text box.

  8. The following user says thank you to jacek for this useful post:

    incapacitant (18th March 2006)

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.