Hi,
I need to insert my application Logo into a QMenuBar or QToolBar but I don't find anyway to perform this.
Thanks,
Hi,
I need to insert my application Logo into a QMenuBar or QToolBar but I don't find anyway to perform this.
Thanks,
Òscar Llarch i Galán
You can add a dummy menu, with an icon with out text, that will do nothing.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Hi,
And, if I want the logo to be shown on the right? I don't want the icon to be shown next to the other actions.
Thanks,
Òscar Llarch i Galán
How about reversing the layout![]()
Hi,
Reversing the QToolBar layoutDirection layouts all icons to the right.How about reversing the layout![]()
I just want the actions on the left side and the logo(QLabel) to the right side.
Will try adding a QSpacer.
Òscar Llarch i Galán
Hi,
It's not possible to add a QSpacerItem because it not inherit from QWidget.
Any other idea?
Thanks,
Òscar Llarch i Galán
But QMenuBar does inherit QWidget, so you can add a spacer item to its layout.It's not possible to add a QSpacerItem because it not inherit from QWidget.
OR
You can create a custom widget derived from QMenuBar, and override the painEevnt().
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks