0

I want the text shown by the QStatusBar.showMessage method starts 36 pixels off the left side of the bar. I have tried these 3 approaches from inside my MainWindow.cpp code:

statusBar()->setStyleSheet("QStatusBar { padding-left: 36px; }");
statusBar()->setContentsMargins(36, 0, 0, 0);
statusBar()->layout()->setContentsMargins(36, 0, 0, 0);

None of them do the job. Moreover, the showMessage method is not virtual, so I cannot override it. On the other hand, I want to alter the style without compromising the use of the original showMessage method (as it is used elsewhere in the application), so new methods are not welcome.

coterobarros
  • 941
  • 1
  • 16
  • 25

0 Answers0