Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Integration C++/QML
Forum Updated to NodeBB v4.3 + New Features

Integration C++/QML

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 414 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mhaylson
    wrote on last edited by
    #1

    I have a GUI project with several sub-projects, that is a very extensive directories of tree. Many sub-projects are GUI plugins. I am wanting to make a sub-project with QML, or want to migrate GUI for QML. When I call the QML, my QML screen appears:

        engine.addImportPath("/home/mhaylson/m2smart/dsm/src/module");
        qDebug() << engine.importPathList();
    
        component = new QQmlComponent(&engine, QUrl("qrc:/cashierqml/imports/CashierQml/CashierNfce.qml"));
            if (component->isLoading())
                QObject::connect(component, SIGNAL(statusChanged(QQmlComponent::Status)),
                                 this, SLOT(continueLoading()));
            else
                continueLoading();
    
    if (component->isError()) {
            qWarning() << component->errors();
        } else {
            QObject *myObject = component->create();
    
            QObject::connect(myObject, SIGNAL(signalShowMessag(QString)), this, SLOT(showMessa(QString)));
    }
    

    But my QML screen "freezes", or click on a button or try to do some interaction or action and nothing happens. I did QML screen test on a new project and it worked properly.

     int main(int argc, char *argv[])
     {
           QApplication app(argc, argv);
    
           QQmlApplicationEngine engine;
           engine.load(QUrl(QStringLiteral("qrc:/cashierqml/imports/CashierQml/CashierNfce.qml")));
    
    return app.exec();
      }
    

    Why that?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved