blob: e4cd14398c68b7b727046c9ab4f83e08a31ca53b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <QGuiApplication>
#include <QScreen>
#include "window.h"
int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
Window a;
a.setVisible(true);
Window b;
b.setVisible(true);
Window child(&b);
child.setVisible(true);
// create one window on each additional screen as well
QList<QScreen *> screens = app.screens();
foreach (QScreen *screen, screens) {
if (screen == app.primaryScreen())
continue;
Window *window = new Window(screen);
window->setVisible(true);
window->setWindowTitle(screen->name());
}
return app.exec();
}
|