Wizard



  • where is error?

    import QtQuick 2.0
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.0
    import QtQuick.Window 2.3
    import QtQuick.Controls.Styles 1.4
    import QtQml 2.2

    Page{
    QWizardPage *createIntroPage()
    {
    QWizardPage *page = new QWizardPage;
    page->setTitle("Introduction");

    QLabel *label = new QLabel("This wizard will help you register your copy "
                               "of Super Product Two.");
    label->setWordWrap(true);
    
    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget(label);
    page->setLayout(layout);
    
    return page;
    

    }

    QWizardPage *createRegistrationPage()
    {
    ...
    }

    QWizardPage *createConclusionPage()
    {
    ...
    }

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);

    #ifndef QT_NO_TRANSLATION
    QString translatorFileName = QLatin1String("qt_");
    translatorFileName += QLocale::system().name();
    QTranslator *translator = new QTranslator(&app);
    if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
    app.installTranslator(translator);
    #endif

    QWizard wizard;
    wizard.addPage(createIntroPage());
    wizard.addPage(createRegistrationPage());
    wizard.addPage(createConclusionPage());
    
    wizard.setWindowTitle("Trivial Wizard");
    wizard.show();
    
    return app.exec();
    

    }

    }


  • Qt Champions 2017

    Did you try this as QML Program ? What kind of project you created for this ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.