QToolButton with icon + text (below) and InstantPopup = looks bad
-
Hi all,
I have a QToolBar on which I put some QToolButtons.
They are displayer as Icon + text (Qt::ToolButtonTextUnderIcon) and have popup mode QToolButton::InstantPopup.The problem is, the small triangle that indicates the presence of the popup overlaps with the text.
!http://i.imgur.com/bztWx4B.png()!
I have to add a trailing space char to the strings to avoid that.
Qt 5.3 & 5.4, Win 7 x64.
MaX.
-
Hi, If you don't want that triangle to appear, call InstantPopup instead of MenuButtonPopup : )
" Documentation":http://qt-project.org/doc/qt-4.8/qtoolbutton.html#ToolButtonPopupMode-enum
-
No, I'm using InstantPopup. If I use MenuButtonPopup I have a different "triangle" button and its position is not a problem.
The positioning problem seems to be there only with InstantPopup.
I was actually surprised to get the "triangle" with InstantPopup, but it makes sense as an indicator that clicking on the button (not necessarily on the triangle) will create a popup. It's just the layout that is strange.
MaX.
-
And did you tried with void setArrowType ( Qt::ArrowType type ) and pas it Qt::NoArrow ??
-
setArrowType does something totally different (it displays an arrow instead of the icon).
MaX.