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. unsupported Qt Quick version - main.qml not found
Forum Updated to NodeBB v4.3 + New Features

unsupported Qt Quick version - main.qml not found

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 2.1k 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.
  • ekkescornerE Offline
    ekkescornerE Offline
    ekkescorner
    Qt Champions 2016
    wrote on last edited by
    #1

    just started to evaluate Qt 5.6 Beta
    created a new project
    then to test Qt.labs.controls copied from https://doc-snapshots.qt.io/qt5-5.6/qtlabscontrols-gettingstarted.html
    main.cpp:

    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    
    int main(int argc, char *argv[])
    {
        QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
        QGuiApplication app(argc, argv);
        QQmlApplicationEngine engine("main.qml");
        return app.exec();
    }
    

    main.qml:

    
    
    import QtQuick 2.6
    import Qt.labs.controls 1.0
    
    ApplicationWindow {
        title: "My Application"
        width: 640
        height: 480
        visible: true
    
        Button {
            text: "Push Me"
            anchors.centerIn: parent
        }
    }
    

    tried to open in Designer got 'unsupported Qt Quick version'

    tried to run on Android device:
    getting only a black screen and errors:

    W/libtest_q2_controls.so(15994): (null):0 ((null)): QQmlApplicationEngine failed to load component
    W/libtest_q2_controls.so(15994): (null):0 ((null)): file:///data/data/org.qtproject.example.test_q2_controls/files/main.qml:-1 File not found
    

    Am I missing anything ?
    Or are there any examples / wizards for Qt 5.6 samples using qt.labs.controls and High DPI for android ?

    thx for helping

    ekke
    ...new at Qt 5.6
    ...experienced at BlackBerry Cascades - now trying to find a way to support x-platform w Qt 5.6+

    ekke ... Qt Champion 2016 | 2024 ... mobile business apps
    5.15 --> 6.9 https://t1p.de/ekkeChecklist
    QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

    1 Reply Last reply
    1
    • tekojoT Offline
      tekojoT Offline
      tekojo
      wrote on last edited by
      #2

      Hmm,

      This might be a question for the Interest mailing list
      http://lists.qt-project.org/mailman/listinfo/interest
      Or even development http://lists.qt-project.org/mailman/listinfo/development
      as the labs controls are just coming in 5.6.
      The developers are more likely to see the question there. (assuming you need the actual developer)

      1 Reply Last reply
      0
      • jpnurmiJ Offline
        jpnurmiJ Offline
        jpnurmi
        wrote on last edited by
        #3

        Hi, where is the main.qml file located? The minimal example snippet loads it from the file system, but if main.qml is in the resources, you would do something like:

        QQmlApplicationEngine engine;
        engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
        

        Thanks for bringing this up. I'll update the example snippet in the documentation to match the default Qt Quick application template in Qt Creator.

        1 Reply Last reply
        1
        • ekkescornerE Offline
          ekkescornerE Offline
          ekkescorner
          Qt Champions 2016
          wrote on last edited by
          #4

          great !
          now it works and I can go on with evaluating.

          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
          5.15 --> 6.9 https://t1p.de/ekkeChecklist
          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

          1 Reply Last reply
          1

          • Login

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