basic Qt application, with dual screen capability, and sway config to auto-assign

This commit is contained in:
2026-08-07 00:24:58 -05:00
parent a50800dc8c
commit 07dfd7d3f4
74 changed files with 126091 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.16)
project(nomad-shell VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 REQUIRED COMPONENTS Quick)
qt_standard_project_setup()
qt_add_executable(nomad-shell
src/main.cpp
)
qt_add_qml_module(nomad-shell
URI nomad
VERSION 1.0
QML_FILES
qml/Main.qml
)
target_link_libraries(nomad-shell
PRIVATE Qt6::Quick
)
+42
View File
@@ -0,0 +1,42 @@
import QtQuick
import QtQuick.Window
QtObject {
property Window topWindow: Window {
width: 960
height: 540
visible: true
title: "nomad-top"
Rectangle {
anchors.fill: parent
color: "#181818"
Text {
anchors.centerIn: parent
text: "nomad top screen"
color: "white"
font.pixelSize: 50
}
}
}
property Window bottomWindow: Window {
width: 620
height: 540
visible: true
title: "nomad-bottom"
Rectangle {
anchors.fill: parent
color: "#181818"
Text {
anchors.centerIn: parent
text: "nomad bottom screen"
color: "white"
font.pixelSize: 50
}
}
}
}
+15
View File
@@ -0,0 +1,15 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.loadFromModule("nomad", "Main");
if (engine.rootObjects().isEmpty())
return -1;
return app.exec();
}