1、pro配置 QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17LIBS +=-lglib-2.0 LIBS +=-lgobject-2.0 LIBS +=