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.
InheritsQWidget.

QMainWindow Class Reference
The QMainWindow class provides a main application window.
InheritsQWidget.

可以看到QMainWindow和QDialog都是继承自QWidget。

你可能感兴趣的:(window)