update screen list when screen plugged/unplugged #LINQT-2454

This commit is contained in:
Gaelle Braud 2026-03-18 16:25:50 +01:00
parent 5bb9c1a6a4
commit 8c7ddd2a14

View file

@ -19,6 +19,8 @@
*/ */
#include "ScreenList.hpp" #include "ScreenList.hpp"
#include "core/App.hpp"
#include <QGuiApplication> #include <QGuiApplication>
#include <QPixmap> #include <QPixmap>
#include <QScreen> #include <QScreen>
@ -28,6 +30,8 @@
ScreenList::ScreenList(QObject *parent) : AbstractListProxy(parent) { ScreenList::ScreenList(QObject *parent) : AbstractListProxy(parent) {
connect(this, &ScreenList::modeChanged, this, &ScreenList::update); connect(this, &ScreenList::modeChanged, this, &ScreenList::update);
connect(App::getInstance(), &App::screenAdded, this, &ScreenList::update);
connect(App::getInstance(), &App::screenRemoved, this, &ScreenList::update);
} }
ScreenList::~ScreenList() { ScreenList::~ScreenList() {