Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Converting QMLProject to Pro issues, questions

Converting QMLProject to Pro issues, questions

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 224 Views 2 Watching
  • 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
    MEMekaniske
    wrote on last edited by
    #1

    Hey,

    I have made a project design using design studio, and realised that I could not build without converting to pro.

    I followed the https://doc.qt.io/qtcreator/quick-converting-ui-projects.html

    And it works, but I had to do a lot of changes. and the tutorial says to create a QQuickView view;
    But that only gave errors, so main.cpp ended up like this to work:

       QQmlApplicationEngine engine;
       const QUrl url(QStringLiteral("qrc:/qml/main.qml"));
       QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
                        &app, [url](QObject *obj, const QUrl &objUrl) {
           if (!obj && url == objUrl)
               QCoreApplication::exit(-1);
       }, Qt::QueuedConnection);
       engine.load(url);
    
       app.exec();
    

    Also, the styles set in design studio was gone, and so was the

    Import ProjectName
    

    Had to change it to

    import "../imports/ProjectName"
    

    To get the Constants from design studio project..

    Should the tutorial work right out the box, or is the changes I have made normal to make?

    Feels like I missed something as I have to change stuff in each QML file..

    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