Show Icon and Text for QToolButton with defaultAction
Unsolved
General and Desktop
-
-
Hi and welcome to devnet,
What version of Qt are out using ?
On what platform ?
With which compiler ?
Can you provide a minimal sample example so that other people can test it ? -
Works fine for me.... Example code below:
auto toolButton = new QToolButton(toolBar); toolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); auto act = new QAction(); act->setIcon(QIcon(":/icon.png")); act->setText("some text"); toolButton->setDefaultAction(act);