c++qtqtstylesheets

How to put arrow icon next to text in QToolButton QT C++


I am using QToolButton as dropdown button (but not setting QMenu to QToolButton). On click of button, I am showing my customize menu which is not QMenu based class. I want to put a down arrow on button.

I tried stylesheet and other thing but icon showing before text. I want down arrow after text.

like

enter image description here

how to do it


Solution

  • Put the arrow as a Unicode caracter, for example 'BLACK DOWN-POINTING TRIANGLE' or 'BLACK DOWN-POINTING SMALL TRIANGLE'.

    That would give you something like "Modify ▼"