一 问题原状源码QDateTine *AA new QDateTimeQGridLaybox *CLayout new QGridLayout;CLayout.addWidget(AA, 1,1);二 编译报错提示no mattching for call to QGridLayout :: addWidget(QDateTime*, int, int) 三 问题原因 控件类型未正确QDateTine *AA new QDateTime改为QDateTineEdit *AA new QDateTimeEdit四 问题解决OKOK。五 习惯拖拖画画的界面方式改用纯代码写界面 还是后者好。 加油。。。