Is it possible to use the same QAction in different contexts and show its title in only one?
-
I'm adding the same QAction, already connected to actions, to a QToolBar and to a QMenu. This QAction have a title and an Icon. The problem is that I need the QAction that appears in the QToolbar to show only the icon and not the title, while the QAction that appears in the QMenu show the title and the icon. Is there a way?
-
Hi,
You can use the QToolBar::toolButtonStyle property and set it to
Qt::ToolButtonIconOnly
. -
I'm adding the same QAction, already connected to actions, to a QToolBar and to a QMenu. This QAction have a title and an Icon. The problem is that I need the QAction that appears in the QToolbar to show only the icon and not the title, while the QAction that appears in the QMenu show the title and the icon. Is there a way?
-
Hi,
You can use the QToolBar::toolButtonStyle property and set it to
Qt::ToolButtonIconOnly
.