1. Qt::WFlags报错 在QT5中要改成Qt::WindowFlags。 2.报错 error C2039: “textEdit2”: 不是“Ui::qt0test4Class”的成员 要注意.ui文件里的objectname。