commit 8bd923a6faf51c12c53d16f73128cd5389994a4b Author: ItsDrike Date: Sat Nov 30 19:23:45 2024 +0100 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb15581 --- /dev/null +++ b/.gitignore @@ -0,0 +1,77 @@ +*~ +*.autosave +*.a +*.core +*.moc +*.o +*.obj +*.orig +*.rej +*.so +*.so.* +*_pch.h.cpp +*_resource.rc +*.qm +.#* +*.*# +core +!core/ +tags +*.debug +Makefile* +*.prl +*.app +moc_*.cpp +ui_*.h +qrc_*.cpp +Thumbs.db +*.res +*.rc +/.qmake.cache +/.qmake.stash + +# qtcreator generated files +*.pro.user* +CMakeLists.txt.user* + +# xemacs temporary files +*.flc + +# Vim temporary files +.*.swp + +# Folder attributes / configuration files on various platforms +.DS_STORE +[Dd]esktop.ini +.directory + +# Build directory +build/ + +# Visual Studio generated files +*.ib_pdb_index +*.idb +*.ilk +*.pdb +*.sln +*.suo +*.vcproj +*vcproj.*.*.user +*.ncb +*.sdf +*.opensdf +*.vcxproj +*vcxproj.* + +# MinGW generated files +*.Debug +*.Release + +# Python byte code +*.pyc + +# Binaries +# -------- +*.dll +*.exe + diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..b3d8b2c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 3.16) + +project(Solitare VERSION 0.1 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +find_package(Qt6 6.5 REQUIRED COMPONENTS Quick) + +qt_standard_project_setup(REQUIRES 6.5) + +qt_add_executable(appSolitare + main.cpp +) + +qt_add_qml_module(appSolitare + URI Solitare + VERSION 1.0 + QML_FILES + Main.qml +) + +# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. +# If you are developing for iOS or macOS you should consider setting an +# explicit, fixed bundle identifier manually though. +set_target_properties(appSolitare PROPERTIES +# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appSolitare + MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} + MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} + MACOSX_BUNDLE TRUE + WIN32_EXECUTABLE TRUE +) + +target_link_libraries(appSolitare + PRIVATE Qt6::Quick +) + +include(GNUInstallDirs) +install(TARGETS appSolitare + BUNDLE DESTINATION . + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/Main.qml b/Main.qml new file mode 100644 index 0000000..41424f8 --- /dev/null +++ b/Main.qml @@ -0,0 +1,8 @@ +import QtQuick + +Window { + width: 640 + height: 480 + visible: true + title: qsTr("Hello World") +} diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..700e71a --- /dev/null +++ b/main.cpp @@ -0,0 +1,18 @@ +#include +#include + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + QObject::connect( + &engine, + &QQmlApplicationEngine::objectCreationFailed, + &app, + []() { QCoreApplication::exit(-1); }, + Qt::QueuedConnection); + engine.loadFromModule("Solitare", "Main"); + + return app.exec(); +}