2

How can I add space before QAction icons.Like this image.I set style-sheet for mainToolBar like this spacing:10px; But I need to add tab space before icon 1.

enter image description here

Sachith Wickramaarachchi
  • 5,546
  • 6
  • 39
  • 68

1 Answers1

2

Make placeholder widget and use QToolBar::insertWidget for insert that widget. UPD: Example of code

QWidget* placeholder = new QWidget( this );
ui->toolBar->insertWidget( new QAction( this ), placeholder );
placeholder->setWidth(100);
stanislav888
  • 374
  • 2
  • 9