this code in the constructor of my QWidget inherited class:
Qt Code:
tv->setColumnCount(20); tv->setRowCount(20); hv->addWidget(tv); setLayout(hv);To copy to clipboard, switch view to plain text mode
creates the tablewidget crammed in the upperleft corner like this:
https://i.imgur.com/ZWjY2mE.png
The tableview that stretches itself over the entire widget as it is supposed to has been created by QtCreator form designer. However, it uses the exact same code! I literally copied over the generated code into my class, but some how only the auto-generated widget stretches properly. Removing the generated one doesnt help either.
Now, why the hell doesnt it stretch correctly!? Seriously, this shit is driving my crazy.
Bookmarks