Qt:删除左上角的图标

时间:2017-07-04 15:32:44

标签: qt

我想删除qt应用程序左上角的图标。这是我的main.cpp代码

int main(int argc, char *argv[])
{
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QGuiApplication app(argc, argv);

    QQmlApplicationEngine engine;
    engine.load(QUrl(QLatin1String("qrc:/main.qml")));

    Receive receive;
    QObject *topLevel = engine.rootObjects().value(0);
    QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);

//    setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint);

    QObject::connect(window,SIGNAL(sendUrltoC(QUrl)),&receive,SLOT(getText(QUrl)));

    return app.exec();
}

如果我取消注释评论部分,它会给我一个错误。我该怎么办?

0 个答案:

没有答案