Files
youtube-playlist/src/main.cpp
Ruben Garcalia 81d9952fa3 Pues ahora hay doble buffer
Falta el hilo que descargue el video de youtube, que se dice mas pronto que se hace
2026-08-12 01:48:29 +02:00

38 lines
992 B
C++

#include "logger.hpp"
#include "playlist-controller.hpp"
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QUrl>
#include <filesystem>
int main(int argc, char *argv[]) {
qInstallMessageHandler(MessageHandler);
std::filesystem::path cwd = std::filesystem::current_path();
Logger::info(cwd.string());
QGuiApplication app(argc, argv);
// qmlRegisterType<PlaylistController>("MediaSystem", 1, 0,
// "PlaylistController");
QQmlApplicationEngine engine;
// engine.addImportPath(app.applicationDirPath());
PlaylistController playlist;
engine.rootContext()->setContextProperty("playlist", &playlist);
const QUrl url(QStringLiteral("qrc:/App/ui/main.qml"));
QObject::connect(
&engine, &QQmlApplicationEngine::objectCreationFailed, &app,
[]() { QCoreApplication::exit(-1); }, Qt::QueuedConnection);
engine.load(url);
Logger::info("Engine loaded");
return app.exec();
}