int main(int argc, char **argv) { QGuiApplication app(argc, argv); QSurfaceFormat format; format.setSamples(16); TriangleWindow window; window.setFormat(format); window.resize(640, 480); window.show(); window.setAnimating(true); return app.exec(); }
int main(int argc, char **argv) { srand(time(NULL)); QGuiApplication app(argc, argv); QSurfaceFormat format; format.setSamples(16); paramCamera* c=new paramCamera(); TriangleWindow window; window.c = c; window.setFormat(format); window.resize(500,375); window.setPosition(0,0); window.show(); TriangleWindow window2(100); window2.c = c; window2.setFormat(format); window2.resize(500,375); window2.setPosition(500, 0); window2.setSeason(1); window2.show(); TriangleWindow window3(500); window3.c = c; window3.setFormat(format); window3.resize(500,375); window3.setPosition(0, 450); window3.setSeason(2); window3.show(); TriangleWindow window4(1000); window4.c = c; window4.setFormat(format); window4.resize(500,375); window4.setPosition(500,450); window4.setSeason(3); window4.show(); return app.exec(); }
int main(int argc, char *argv[]) { printf("Create App\n"); #ifdef AA_DisableHighDpiScaling // XXX with high dpi scaling, plugin crashes without initial screen QCoreApplication::setAttribute(AA_DisableHighDpiScaling, true); #endif QApplication app(argc, argv); if (app.platformName() != "barebone") { printf("This app requires QBareBone platform\n"); return -1; } Card card; KmsManager* mgr = new KmsManager(card) QBareClient* bb = new QBareClient(app, mgr); //dump_screens(app); QList<QScreen*> screens = app.screens(); QScreen* lcd = screens[0]; QScreen* hdmi = screens[1]; int test_num = 0; if (test_num == 0) { MainWindow *w1 = new MainWindow(); //w1->winId(); //w1->windowHandle()->setScreen(lcd); w1->move(50, 50); w1->show(); //MainWindow *w2 = new MainWindow(); //w2->winId(); //w2->windowHandle()->setScreen(hdmi); //w2->move(300, 50); //w2->show(); } else if (test_num == 1) { QSurfaceFormat format; format.setSamples(16); TriangleWindow *window = new TriangleWindow(); window->setFormat(format); window->resize(640, 480); window->show(); window->setAnimating(true); } else if (test_num == 2) { RasterWindow *w = new RasterWindow(); w->show(); } else if (test_num == 3) { QWidget* moveblk = create_moveblocks(); moveblk->windowHandle()->setScreen(hdmi); moveblk->hide(); moveblk->show(); } printf("Enter mainloop\n"); app.exec(); delete bb; return 0; }