qt 6.6.0 clean

This commit is contained in:
kleuter
2023-11-01 22:23:55 +01:00
parent 7b5ada15e7
commit 5d8194efa7
1449 changed files with 134276 additions and 31391 deletions

View File

@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.16)
project(qml_project LANGUAGES CXX)
find_package(Qt6 REQUIRED COMPONENTS Gui Qml Quick Core)
qt_standard_project_setup()
qt_add_executable(qml_project
main.cpp
)
qt_add_qml_module(qml_project
URI qml_project
OUTPUT_DIRECTORY qml
VERSION 1.0
RESOURCE_PREFIX /qt/qml
QML_FILES
TestComponent.qml
main.qml
)
target_link_libraries(qml_project
PRIVATE
Qt::Gui
Qt::Qml
Qt::Quick
Qt::Core
)

View File

@ -0,0 +1,4 @@
import QtQuick
Item {
}

View File

@ -0,0 +1,18 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
const QUrl url(QStringLiteral("qrc:/qt/qml/qml_project/main.qml"));
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)
QCoreApplication::exit(-1);
}, Qt::QueuedConnection);
engine.load(url);
return app.exec();
}

View File

@ -0,0 +1,16 @@
import QtQuick
import QtQuick.Window
Window {
width: 640
height: 480
visible: true
title: "Hello World"
Text {
anchors.centerIn: parent
font.pointSize: 16
text: "Now I have CMakeLists.txt. Thanks!"
}
TestComponent {
}
}