native: flaten file structure

This commit is contained in:
Johannes Jöns 2024-07-08 20:07:09 +02:00
parent e466a28c1b
commit 7272b66f2f
23 changed files with 21 additions and 34 deletions

2
native/.gitignore vendored
View file

@ -1,2 +0,0 @@
**/build
*.autosave

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View file

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View file

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View file

@ -1,6 +1,22 @@
#include <iostream>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QIcon>
int main() {
std::cout << "Hello World!";
return 0;
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
app.setWindowIcon(QIcon(":/Qt6-Quick-Example/Assets/Icons/Jukebox.ico"));
QQmlApplicationEngine engine;
const QUrl url(u"qrc:/Qt6-Quick-Example/Main.qml"_qs);
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

@ -1,5 +0,0 @@
executable(
'license-tool',
'main.cpp',
install: true,
)

View file

@ -1,22 +0,0 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QIcon>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
app.setWindowIcon(QIcon(":/Qt6-Quick-Example/Assets/Icons/Jukebox.ico"));
QQmlApplicationEngine engine;
const QUrl url(u"qrc:/Qt6-Quick-Example/Main.qml"_qs);
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

@ -9,7 +9,7 @@ stdenv.mkDerivation {
pname = "native";
version = "0.1";
src = ../native/Qt-Apps/Qt-Quick/Qt6-Quick-Example;
src = ../native;
buildInputs = [ kdePackages.qtbase kdePackages.qtdeclarative kdePackages.qtmultimedia ];