Let’s consider we have QWidget that contains QTableWidget (only). So we want to resize the table by resizing the widget, and we dont want to have an indet between the QWidget border and cells of the table. What kind of property is making posible for QTableWidget to be aligned with the borders of it parent widget?
Thanks.
First, you want to make sure the
QTableWidgetis placed inside a layout. For instance,assuming
parent_widgetis already pointing to the widget containing theQTableWidget. This will ensure that the table resizes when the parent widget does. To have the table fill the entire space of the widget, just set the margin to zero on the layout. Try one of these:or