#include #include #include int main(int argc, char *argv[]) { // QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // does not matter QApplication app(argc, argv); // Show child on the left screen QWidget *widget = new QWidget(nullptr, Qt::Dialog); widget->setGeometry(-1700, 200, 600, 400); widget->setWindowTitle("child"); // Turn of the left (secondary) screen. The widget is no longer visible widget->show(); app.exec(); }