Merge remote-tracking branch 'origin/main'
# Conflicts: # CMakeLists.txt
This commit is contained in:
commit
b5566cbcf7
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
build/
|
|
@ -3,4 +3,8 @@ project(itat_challange_olympics)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
add_executable(itat_challange_olympics src/main/main.cpp)
|
add_executable(itat_challange_olympics main.cpp)
|
||||||
|
|
||||||
|
find_package(Qt6 REQUIRED COMPONENTS Quick)
|
||||||
|
target_link_libraries(itat_challange_olympics PRIVATE Qt6::Quick)
|
||||||
|
|
||||||
|
|
13
application.qml
Normal file
13
application.qml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
ApplicationWindow {
|
||||||
|
width: 400
|
||||||
|
height: 400
|
||||||
|
visible: true
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id: button
|
||||||
|
text: "A Special Button"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,19 @@
|
||||||
#include <iostream>
|
#include <QGuiApplication>
|
||||||
|
#include <QQmlEngine>
|
||||||
|
#include <QQmlContext>
|
||||||
|
#include <QQmlComponent>
|
||||||
|
|
||||||
int main() {
|
int main(int argc, char *argv[])
|
||||||
std::cout << "Hello, World!" << std::endl;
|
{
|
||||||
return 0;
|
QGuiApplication app(argc, argv);
|
||||||
|
|
||||||
|
QQmlEngine engine;
|
||||||
|
QQmlContext *objectContext = new QQmlContext(engine.rootContext());
|
||||||
|
|
||||||
|
QQmlComponent component(&engine, "application.qml");
|
||||||
|
QObject *object = component.create(objectContext);
|
||||||
|
|
||||||
|
// ... delete object and objectContext when necessary
|
||||||
|
|
||||||
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue