mmonem
mmonem

Reputation: 2831

How to add a QAction to specific position in a QToolBar

QToolBar::insertWidget allows to add a QWidget after a specific QAction. Is there any way to add a QAction at a specific position?

Removing all actions and then re-adding them again after is my last hope !

Upvotes: 4

Views: 2815

Answers (1)

Leiaz
Leiaz

Reputation: 2917

You can use the insertAction() method, inherited from QWidget, to insert your QAction before a given QAction.

Upvotes: 3

Related Questions