1

I add a QToolBox to my ui file.

But there is no any option to change alignment!

I want change QToolBox header text alignment from left to right to right to left.

How can I do it?

Paolo Forgia
  • 6,572
  • 8
  • 46
  • 58

1 Answers1

1

Unfortunately, there is no any magic method which change the alignment, but you can use stylesshets. For example:

ui->toolBox->setStyleSheet(" QToolBox::tab {padding-left: 10px;} ");

This code allows you move text of header to right and to left(if you reset this option), but it isn't alignment. Anyways it is better than nothing.

Jablonski
  • 18,083
  • 2
  • 46
  • 47