QFrame, QScrollArea, etc. have properties that handle the appearance of the panel and are suitable for the compopent container, as well as the behavior of the form layout.
QWidget does not have frameShape (), frameShadow (), lineWidth (), but has layout and size control methods, so it can also be used as a panel if you do not need any borders, scrolling, docking or other additional behavior.
source share