PDA

View Full Version : QMainWindow _really_ remove margin



ugluk
17th May 2012, 11:50
I do this in the constructor of a QMainWindow superclass:



layout()->setContentsMargins(0, 0, 0, 0);
centralWidget()->layout()->setContentsMargins(0, 0, 0, 0);


but still some margins remain (about 2 pixels) between the central widget and the main window. How do I remove the margins completely? I am trying to do this as I use QMainWindow as a child of QStackedWidget and don't need the margins.

Added after 20 minutes:

It was a QFrame frameShape of a subcontrol that made it appear, as if margins still existed. Thanks!