Jai
Jai

Reputation: 1332

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

Upvotes: 3

Views: 4070

Answers (2)

Gwen
Gwen

Reputation: 1452

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 ▼"

Upvotes: 3

msc
msc

Reputation: 34568

Try to set toolButtonStyle property to ToolButtonTextUnderIcon in QToolButton.

Upvotes: 1

Related Questions