After reading my post again I see, that it is a bit difficult to understand. So here is a longer explanation:
I know the purpose of promoting, but I thought I could (ab)use it to achieve my goal inserting a QToolBar into my widget into the designer.
Like: This a QWidget promoted to QToolBar. Adding the right header and setting it to global. In this way the uic would included the code for the QToolBar (that was my idea, but it didn't work, because the designer knows, that QToolBar is a special widget of Qt and don't allow this)
While playing with this I detected, that it is possible to subclass from QToolBar in the promoting dialog. So I thought that is must be possible to insert a QToolBar directly, since its not possible to promote a normal QWidget to a class, that inherit from QToolBar. That was my state when I was writing the post: "There is a way to directly insert a QToolBar, else this feature would make no sense"
But after a bit research the only way to insert a QToolBar seem to use QMainWindow and then "add toolbar". (and this one you could use to promote to a custom widget that is inheriting QToolBar)
How could QMenuBar help me in my case? It seems to have the same limitations as the QToolBar
Bookmarks