本文整理汇总了C++中QtQuick2ApplicationViewer::showExpanded方法的典型用法代码示例。如果您正苦于以下问题:C++ QtQuick2ApplicationViewer::showExpanded方法的具体用法?C++ QtQuick2ApplicationViewer::showExpanded怎么用?C++ QtQuick2ApplicationViewer::showExpanded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QtQuick2ApplicationViewer
的用法示例。
在下文中一共展示了QtQuick2ApplicationViewer::showExpanded方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qDebug()<<"QGuiApplication";
qmlRegisterType<LogicChannel>("LogicAnalyer", 1, 0, "LogicChannel");
qmlRegisterType<LogicSeries>("LogicAnalyer", 1, 0, "LogicSeries");
qmlRegisterType<LogicAcquirerSimulator>("LogicAnalyer", 1, 0, "LogicAcquirerSimulator");
qmlRegisterType<Timeline>("LogicAnalyer", 1, 0, "Timeline");
qmlRegisterType<Timescale>("LogicAnalyer", 1, 0, "Timescale");
qmlRegisterType<LogicAcquirerSimulator>("LogicAnalyer", 1, 0, "QuickItemDemo0");
qDebug()<<"qmlRegisterType";
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/LogicAnalyser/LogicAnalyser.qml"));
// viewer.setMainQmlFile(QStringLiteral("qml/LogicAnalyser/testQml.qml"));
viewer.showExpanded();
// QVariant
return app.exec();
}
示例2: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
//Logic logic(":/aggettivi.txt", viewer.rootContext());
Logic logic(":/indeterminativo", viewer.rootContext());
ExerciseVocabularyAnswer vocabulary(":/parole.txt");
TwoSetExercise set;
set.load("/tmp/sets.xml");
set.print();
viewer.rootContext()->setContextProperty("logic", &logic);
viewer.rootContext()->setContextProperty("vocabulary", &vocabulary);
viewer.rootContext()->setContextProperty("setexercise", &set);
//viewer.addImportPath("qml/educazionik-framework/");
viewer.setMainQmlFile(QStringLiteral("qml/educazionik-framework/main.qml"));
viewer.showExpanded();
return app.exec();
}
示例3: main
int main(int argc, char * argv[])
{
qsrand(QTime::currentTime().msec());
qmlRegisterType<QmlMapInterface>("DumbHome", 1, 0, "QmlMapInterface");
qmlRegisterType<MapObjectQmlWrapper>("DumbHome", 1, 0, "MapObjectQmlWrapper");
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qmlsrc/code-if-wanna-live/main.qml"));
viewer.showExpanded();
Map * const map = createMap();
World world(map, new MapPhysics(*map));
PlayerActionsQmlReceiver playerActionsQmlReceiver(world.getMap());
viewer.rootContext()->setContextProperty("playerActionsReceiver", &playerActionsQmlReceiver);
QmlMapInterface * const qmlMapInterface =
viewer.rootObject()->findChild<QmlMapInterface*>("qmlMapInterface");
if (qmlMapInterface != nullptr)
{
qmlMapInterface->setMap(world.getMap());
world.getMapPhysics().addListener(*qmlMapInterface);
}
return app.exec();
}
示例4: main
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QDir::setCurrent(QCoreApplication::applicationDirPath());
App application;
qmlRegisterType<App>("App", 1, 0, "App");
qmlRegisterType<CollectionModel>("CollectionModel", 1, 0, "CollectionModel");
qmlRegisterType<QStringListModel>("QStringListModel", 1, 0, "QStringListModel");
QtQuick2ApplicationViewer viewer;
viewer.rootContext()->setContextProperty("app", &application);
viewer.rootContext()->setContextProperty("checkModeCpp", &application.getCheckMode());
viewer.rootContext()->setContextProperty("dictionaryModeCpp", &application.getDictionaryMode());
viewer.rootContext()->setContextProperty("rememberModeCpp", &application.getRememberMode());
viewer.setMainQmlFile(QStringLiteral("qml/Learn/main.qml"));
viewer.showExpanded();
viewer.setIcon(QIcon(":/new/g/dictionary-icon.png"));
viewer.setTitle("Learn");
application.setWindow(&viewer);
return app.exec();
}
示例5: main
int main(int argc, char *argv[])
{
qDebug("[Salticidae] Init Salticidae v%s", PROJECT_VERSION);
QCoreApplication::setOrganizationName("Rabits");
QCoreApplication::setOrganizationDomain("rabits.org");
QCoreApplication::setApplicationName("salticidae");
QCoreApplication::setApplicationVersion(PROJECT_VERSION);
QGuiApplication app(argc, argv);
Eyes::registerQmlTypes();
PluginManager::initPlugins();
QtQuick2ApplicationViewer viewer;
Eyes::I()->initContext(viewer, &app);
qDebug("[Salticidae] Loading qml");
viewer.setSource(QUrl("qrc:/qml/salticidae/main.qml"));
QObject::connect(viewer.engine(), SIGNAL(quit()), &viewer, SLOT(close()));
Eyes::I()->initRoot(viewer);
qDebug("[Salticidae] Init done, starting");
viewer.showExpanded();
return app.exec();
}
示例6: main
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLocalSocket localSocket;
localSocket.connectToServer("bloggerQml", QIODevice::ReadOnly);
if(localSocket.waitForConnected(5000))
{
// there is already an application running
qDebug() << "Application is already running.";
QMessageBox::information(0, QObject::tr("Erro"), QObject::tr("A aplicação já está a ser executada."), QMessageBox::Ok);
return 0;
}
QLocalServer localServer;
localServer.listen("bloggerQml");
BloggerLoader bloggerloader;
bloggerloader.loadBlogsFromFile();
BloggerProxyModel model;
model.setSourceModel(bloggerloader.model());
Helper helper;
QtQuick2ApplicationViewer viewer;
viewer.rootContext()->setContextProperty("blogsModel", &model);
viewer.rootContext()->setContextProperty("helper", &helper);
viewer.rootContext()->setContextProperty("bloggerloader", &bloggerloader);
viewer.setMainQmlFile(QStringLiteral("qml/blogerQML/main.qml"));
viewer.showExpanded();
int res = app.exec();
bloggerloader.saveDB();
return res;
}
示例7: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QString fileName;
if (app.arguments().length() > 1) {
fileName = app.arguments().at(1);
} else {
qWarning() << "Pass extracted json memory info dump as argument";
return 0;
}
QtQuick2ApplicationViewer viewer;
QFile jsonFile(fileName);
if (!jsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
qWarning() << "Failed to open file:" << fileName;
return 0;
}
viewer.setTitle(fileName);
viewer.engine()->rootContext()->setContextProperty("jsonFile", QString(jsonFile.readAll()));
viewer.setMainQmlFile(QStringLiteral("qml/memory-dump-reader.qml"));
viewer.showExpanded();
return app.exec();
}
示例8: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv); // Create the base application class
QtQuick2ApplicationViewer viewer; // create the QML viewer window
// The below code will eventually be wrapped in a top level class
// Initialize the flyweight
//Create first Variable "A"
Var* current_var(nullptr);
CalculationFlyWeight flyweight;
QString token(flyweight.insertCalculation("0","A",current_var));
// Initialize the InputEventHandle class connects QML user input -> C++ Backend logic
InputEventHandler in(&flyweight,viewer.engine()->rootContext(),&viewer,nullptr,current_var);
// Make the Event Handler visible as QObject& in QML
viewer.engine()->rootContext()->setContextProperty("EventHandler",&in);
// simulate a user input call to place A as the current variable in the editor
in.requestVariable(token);
// set the main qml file
viewer.setMainQmlFile(QStringLiteral("User_Interface/qml/main.qml"));
viewer.showExpanded(); // set fullscreen, and visible
return app.exec(); // run the main Application Event loop
}
示例9: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qmlRegisterType<KinectCamera>("KinectCamera",1,0,"KinectCamera");
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/kinecttest/main.qml"));
viewer.showExpanded();
return app.exec();
}
示例10: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/samegame/main.qml"));
viewer.showExpanded();
return app.exec();
}
示例11: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
qmlRegisterType<MQTT>("mqtt", 1, 0, "MQTT");
viewer.setMainQmlFile(QStringLiteral("qml/mqtt/main.qml"));
viewer.showExpanded();
return app.exec();
}
示例12: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
qmlRegisterType<mupServerHandle>("mupServerHandle", 1, 0, "ServerHandle");
viewer.setMainQmlFile(QStringLiteral("qml/MUP_qchartjs/main.qml"));
viewer.showExpanded();
return app.exec();
}
示例13: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
// It is a good Idea to use a URI naming scheme to specify the module package name
qmlRegisterType<VSXuAccelerometer>("org.vovoid.vsxu", 1, 0, "VSXuAccelerometer");
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/VSXuDroid/main.qml"));
viewer.showExpanded();
return app.exec();
}
示例14: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qmlRegisterType<ConwayListModel>("com.minimoog77", 1, 0, "ConwayListModel");
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/quickconway/main.qml"));
viewer.showExpanded();
return app.exec();
}
示例15: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qmlRegisterType<GameModel>("LifeGame", 1, 0, "GameModel");
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/LifeGameQML01/main.qml"));
viewer.showExpanded();
return app.exec();
}