I have QWidget instance (with other QWidgets inside) in Qt 5.8 and I want to set some border around it. Is there some way to do this from C++ without affecting any of it's children and their settings and positions?
I don't want to use stylesheets and it needs to work with any system style.
you should use QFrame that inherits QWidget.
and set Frame::Shape in the method below to QFrame::Box. this will produce borders around your Frame.
QFrame::setFrameShape( QFrame::Shape);
and use setLineWidth to set the lineWidth
QFrame::setLineWidth(int);