PDA

View Full Version : Centering a table in QTableWidget



Malorn44
3rd April 2019, 18:02
Hi. After looking through the documentation, I don't think there is a built-in way to do this so I want to ask what approach people here thought was best.

I have a qTableWidget and I want to have the table centered.
13077

I want to have this table centered. How can I do this? I'm very lost. Thanks. Let me know if you need any more information.

Ginsengelf
4th April 2019, 07:21
Hi, I'm not sure if you can center the table inside the QTableWidget, but you could try to make the QTableWidget just as large as required for the contents, and then center the complete QTableWidget inside its parent widget, e.g. with a QGridLayout and some spacers.

Ginsengelf