Results 1 to 5 of 5

Thread: How to create an application without title bar and border

  1. #1
    Join Date
    Jul 2009
    Posts
    2
    Thanks
    2
    Qt products
    Platforms
    Unix/X11 Windows

    Question How to create an application without title bar and border

    I want to write an application without title bar and border, in one word something like picture bellow
    i read many thing about window flags and anything else but i couldn't get them working!
    I'm using PyQt4.5 and now working on windows.
    please help me with a small code example

    thank you
    sorry for my bad English
    Attached Images Attached Images

  2. #2
    Join Date
    Sep 2008
    Posts
    25
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to create an application without title bar and border

    Hi!

    Use the Qt::FramelessWindowHint flag. The result will be a window without the frame and title bar. To create something similar to the window on your screenshot, a title bar/frame should be emulated, you have to draw all the controls, implement moving, resizing, react to window events... (btw. to intercept and to properly react to all the window events on Windows requires lots of time and experimentation, take a look at this example)
    Last edited by gsmiko; 13th July 2009 at 14:42.

  3. The following user says thank you to gsmiko for this useful post:

    sasan-j (13th July 2009)

  4. #3
    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: How to create an application without title bar and border

    play with QTDIR/examples/widgets/windowflags.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

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

    sasan-j (13th July 2009)

  6. #4
    Join Date
    Jul 2009
    Posts
    2
    Thanks
    2
    Qt products
    Platforms
    Unix/X11 Windows

    Default Re: How to create an application without title bar and border

    Quote Originally Posted by gsmiko View Post
    Hi!

    Use the Qt::FramelessWindowHint flag. The result will be a window without the frame and title bar. To create something similar to the window on your screenshot, a title bar/frame should be emulated, you have to draw all the controls, implement moving, resizing, react to window events... (btw. to intercept and to properly react to all the window events on Windows requires lots of time and experimentation)
    thanks for answering

    i think my main problem is how to use the flags, there is many examples in C++ but I'm using PyQt, so I need an example in python.

    Edit: I did not see spirit's post before reply, i think i will find my answer in there
    Last edited by sasan-j; 13th July 2009 at 15:10. Reason: updated contents

  7. #5
    Join Date
    Jun 2008
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to create an application without title bar and border

    also i guess you would need WA_TransluscentBackground for the rounded corners

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.