2011-05-03 12:47:10 +00:00
|
|
|
#include <QGuiApplication>
|
2011-07-21 11:50:28 +00:00
|
|
|
#include <QScreen>
|
2011-05-03 12:47:10 +00:00
|
|
|
|
|
|
|
#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);
|
|
|
|
|
2011-07-21 11:50:28 +00:00
|
|
|
// 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());
|
|
|
|
}
|
|
|
|
|
2011-05-03 12:47:10 +00:00
|
|
|
return app.exec();
|
|
|
|
}
|