February 14, 2012

Endless Endless
Lab Rat
83 posts

[Solved] Setting the alignment in a QTableWidget

 

QLabel has setAlignment(), but I can’t find anything like that for QTableWidget. All I’d like to do is have horizontal centering for all data in cells.

1 reply

February 14, 2012

Volker Volker
Ant Farmer
5428 posts

Just call setTextAlignment() on the QTableWidgetItems.

 
  ‹‹ searching your project for all src/*/*.cpp files      Changing look of persistent editors in QTableView ››

You must log in to post a reply. Not a member yet? Register here!