native: flaten file structure
2
native/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
**/build
|
|
||||||
*.autosave
|
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
@ -1,6 +1,22 @@
|
||||||
#include <iostream>
|
#include <QGuiApplication>
|
||||||
|
#include <QQmlApplicationEngine>
|
||||||
|
#include <QIcon>
|
||||||
|
|
||||||
int main() {
|
|
||||||
std::cout << "Hello World!";
|
int main(int argc, char *argv[])
|
||||||
return 0;
|
{
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
executable(
|
|
||||||
'license-tool',
|
|
||||||
'main.cpp',
|
|
||||||
install: true,
|
|
||||||
)
|
|
|
@ -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();
|
|
||||||
}
|
|
|
@ -9,7 +9,7 @@ stdenv.mkDerivation {
|
||||||
pname = "native";
|
pname = "native";
|
||||||
version = "0.1";
|
version = "0.1";
|
||||||
|
|
||||||
src = ../native/Qt-Apps/Qt-Quick/Qt6-Quick-Example;
|
src = ../native;
|
||||||
|
|
||||||
buildInputs = [ kdePackages.qtbase kdePackages.qtdeclarative kdePackages.qtmultimedia ];
|
buildInputs = [ kdePackages.qtbase kdePackages.qtdeclarative kdePackages.qtmultimedia ];
|
||||||
|
|
||||||
|
|