Exemple #1
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    AnalogClock clock;
    clock.show();
    return app.exec();
}
Exemple #2
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QGraphicsScene scene;
    QGraphicsView view(&scene);

    // Add a Widget
    WidgetLoader *loader = new WidgetLoader;
    scene.addWidget(loader);

    //Add a second one and move to right side
    AnalogClock *clock = new AnalogClock;
    clock->move(QPoint(300,0));
    scene.addWidget(clock);

    //Finally the sampleWidget
    SampleWidget *widget = new SampleWidget;
    widget->move(0,300);
    scene.addWidget(widget);


    //Place a qml Widget
    QDeclarativeView *qmlView = new QDeclarativeView;
    qmlView->setSource(QUrl::fromLocalFile("qml/QMLBusTimetable.qml"));
    scene.addWidget(qmlView);
    qmlView->move(300,300);

    view.showMaximized();
    //Fullscreen:
//     view.showFullScreen();

    return a.exec();
}
Exemple #3
0
int main(int argc, char **argv)
{
   QApplication meinProgramm(argc, argv);
   AnalogClock analogclock;
   analogclock.show();
   int rueckgabe = meinProgramm.exec();
   return rueckgabe;
}
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    AnalogClock w;
    w.show();

    return a.exec();
}
Exemple #5
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    AnalogClock clock;
#if defined(Q_OS_SYMBIAN)
    clock.showMaximized();
#else
    clock.show();
#endif
    return app.exec();
}
Exemple #6
0
//! [create application]
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    MyDecoration *decoration = new MyDecoration();
    app.qwsSetDecoration(decoration);
//! [create application]
    
//! [start application]
    AnalogClock clock;
    clock.show();

    return app.exec();
}
Exemple #7
0
int main( int argc, char **argv )
{
    QApplication a( argc, argv );
    AnalogClock *clock = new AnalogClock;
    if ( argc == 2 && strcmp( argv[1], "-transparent" ) == 0 )
	clock->setAutoMask( TRUE );
    clock->resize( 100, 100 );
    a.setMainWidget( clock );
    clock->show();
    int result = a.exec();
    delete clock;
    return result;
}