Widgets in the window frame (titlebar)
-
Hey,
for my next project I want to have some widgets in the window frame like Autodesk's 3ds Max is doing itIs this possible using Qt? I don't want to use a customized titlebar, I want them to be directly on the window frame like in 3ds Max or any other software doing this (AutoCAD, Word 2010, please know I don't mean Ribbon). Is there an special class? Any Qt version can be used (prefer 5.x but 4.x is also ok).
~ jan
-
All below is true according to my knowledge, but my knowledge is limited to what I know :)
If you are talking about area within red it is called quick access toolbar and is a part of ribbon implementation under the Windows.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd940502(v=vs.85).aspx
So your question is asked about ribbon even though you say it was not.And since system draws the frame the only way to have it in Qt (at least cross-platform )
I can imagine is to have frameless window, draw the titlebar and borders and handle window resizing yourself.Sorry if this was not the answer you were looking for.
-
@alex_malyu Yea this looks like that what I am lookin' for. But what I meant in generally is if its possible to take a QWidget like QPushButton and place it in the titlebar, so don't use of Ribbon.
-
Yes it's possible without using Ribbonbar. Here is an template on github
https://github.com/fecub/qt-borderless/tree/master/srcIn titlebar.cpp, you can add controls, layouts, views and so on.
This is what I'm created from the template: http://imgur.com/uKzRLN0
-
As this was discussed many times on the forum already I'll just cut it short and send you to the search button:
Is it possible - yes.
Is it easy - no.
can it be done with Qt alone - no, it requires native APIs at some point, even when using QtWinExtras module. The reason is that frame is a non-client, native window manager space and Qt has no direct access to it without native "hacks". -
@Chris-Kawa I have found some threads (like https://forum.qt.io/topic/3765/moved-painting-in-the-nonclientarea) but the link to http://developer.qt.nokia.com/forums/viewthread/3331/ is dead and this very bad.