QWidget,QMainWindow和QDialog的区别
官方的手册:
QWidget Class Reference
The QWidget class is the base class of all user interface objects.
Inherits: QObject and QPaintDevice.
Inherited by: ……, QDialog, ……,QMainWindow, ……
QDialog Class Reference
The QDialog class is the base class of dialog windows.
Inherits: QWidget.
QMainWindow Class Reference
The QMainWindow class provides a main application window.
Inherits: QWidget.
可以看到QMainWindow和QDialog都是继承自QWidget。
时间宝贵,只能复制+粘贴,若图片无法显示或排版混乱,请访问https://elesos.github.io查找原文