November 18, 2011

holy holy
Lab Rat
2 posts

Windows without title bar but with border

 

I have exactly the same problem and I know that it is solvable (QDockWidget does it successfully).
I haven’t found an easy solution in the Qt Source. Does anybody know how QDockWidget does it?

Moderators note:
This topic was split off from this [developer.qt.nokia.com] topic, because the other topic was on Mobile and Embedded while this one is on the (linux) desktop. While searching the forums for similar information is really good practice (thanks!), it is not always a good idea to revive an old topic. Instead, linking to it may be a better alternative. Andre

6 replies

November 18, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

Hi holy,

AFAIK QDockWidget is not a top levbel widget, which means, everything is done by hand :-)
For top level widgets, this is done by the windowinmg system (in the case of the OP, QWS).

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

November 18, 2011

holy holy
Lab Rat
2 posts

Thank you for your reply. I am mainly interested in linux desktops.
(I know this question is in mobile, but I didn’t want to repost)
If i create a QDockWidget without a parent, it is a top-level widget and still it does not have a system title bar. The flags it has are:

  1. (Qt::Window | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint)

So how does it get no title bar even though it has the Qt::WindowTitleHint flag set?

[EDIT: code formatting, please wrap in @-tags, Volker]

November 19, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

I would propose, you look at the source code.
perhaps (as it it typically not a top level widget) perhaps, these flags have a special handling in this class?

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

November 20, 2011

zentel. zentel.
Lab Rat
3 posts

I want to know whether I can do that in Qt quick project?

November 20, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

if you have a main app and a QDeclarativeView, you can do stuff in C++.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

November 21, 2011

Andre Andre
Area 51 Engineer
6031 posts
holy wrote:
Thank you for your reply. I am mainly interested in linux desktops. (I know this question is in mobile, but I didn’t want to repost)

In that case, let me just move it for you.
-In the future, you can just use the “report” link next to your post and request an admin moves it to the correct subforum. – update:
I decided to split off the topic, because the other part [developer.qt.nokia.com] was on mobile & embedded (moved that part back there). Thanks for searching the forum before just posting your question, but sometimes it is better to just link to it instead of reviving an old topic.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

 
  ‹‹ Multi-touch in Ubuntu      how to recognize type ››

You must log in to post a reply. Not a member yet? Register here!