How would you suggest to add a label on a QToolbar ? Since it only accepts action or somethings like that.
Thx
As abresas wrote, a toolbar can be populated with a QAction. The QString passed along with the QAction is used in several ways (e.g as tooltip), but with 4.8 the default is to show a toolbar button with the icon only. To show the text with the icon, set the toolbar to a Qt::ToolButtonStyle, e.g.
ui->toolBar->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With