From bf6e42192c0949adb70753fbb1d39ddcd26565db Mon Sep 17 00:00:00 2001 From: Christoph Holzheuer Date: Wed, 26 Nov 2025 13:55:37 +0100 Subject: [PATCH] playing around. --- src/main.cpp | 62 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index cd9623d..d306d25 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -211,29 +211,36 @@ public: }; -/* -int main(int argc, char *argv[]) + +class Interface { - QApplication app(argc, argv); - - // hat am wenigsten darstellungfehler (alternative: fusion) - QQuickStyle::setStyle("Imagine"); + virtual int moo() = 0; - XQMainWindow window; - window.show(); +}; - return app.exec(); -} -*/ +class Aspect +{ + + virtual int moo() + { + qDebug() << " --- Aspect moo"; + return 42; + } + +}; + + +class DoWork : public Interface, public Aspect +{ + +}; - - -int main(int argc, char *argv[]) +int firz(int argc, char *argv[]) { QApplication app(argc, argv); @@ -241,8 +248,10 @@ int main(int argc, char *argv[]) QQuickStyle::setStyle("Imagine"); + XQMainWindow window; + // 1. Baum erstellen // Der Benutzer erstellt den Wurzelknoten direkt. Tree root("Root"); @@ -300,13 +309,16 @@ int main(int argc, char *argv[]) if (found_it != root.cend()) { // *found_it gibt den Wert (std::string) zurück std::cout << "Gefunden: " << *found_it << std::endl; - } else { + } + else + { std::cout << "Nicht gefunden." << std::endl; } // 4. Verwendung mit (z.B. std::count_if) std::cout << "\n--- STL std::count_if ---" << std::endl; - int count = std::count_if(root.cbegin(), root.cend(), [](const std::string& val) { + int count = std::count_if(root.cbegin(), root.cend(), [](const std::string& val) + { return val.length() > 5; // Zähle alle Strings mit mehr als 5 Zeichen }); @@ -315,3 +327,21 @@ int main(int argc, char *argv[]) return 0; } + + +int main(int argc, char *argv[]) +{ + + QApplication app(argc, argv); + + // hat am wenigsten darstellungfehler (alternative: fusion) + QQuickStyle::setStyle("Imagine"); + + + XQMainWindow window; + window.show(); + + return app.exec(); + +} +