How to display window form fullscreen on second monitor in Qt?
问题 I m using Qt5 on linux, I want to display window form fullscreen on second screen (dual monitor)? I tried this code but it doesnt work. Is there any other way? QRect screenres = QApplication::desktop()->screenGeometry(1/*screenNumber*/); Widget *secondDisplay = new Widget(); // Use your QWidget secondDisplay->move(QPoint(screenres.x(), screenres.y())); secondDisplay->resize(screenres.width(), screenres.height()); 回答1: You can use QScreen . QScreen *screen = QGuiApplication::screens()[1]; //