Qt5 & QtQuick2 - transparent main window
问题 I am trying to create a simple Qt UI with a frameless window and rounded corners. Starting from a new project with the QtQuick 2 Application template, my code looks like this: main.cpp #include <QtGui/QGuiApplication> #include "qtquick2applicationviewer.h" int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QtQuick2ApplicationViewer viewer; viewer.setMainQmlFile(QStringLiteral("qml/qtquick-test/main.qml")); viewer.setFlags(Qt::FramelessWindowHint); viewer.showExpanded();