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. "Type Dialog unavailable" in Qt 5.9
Qt 6.11 is out! See what's new in the release blog

"Type Dialog unavailable" in Qt 5.9

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 3.6k Views 1 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.
  • K Offline
    K Offline
    kimdata
    wrote on last edited by kimdata
    #1

    I use Qt Quick Dialog on my Android app, and the app quits as soon as I run it with the following error:

    W libAppTest.so: (null):0 ((null)): QQmlApplicationEngine failed to load component
    W libAppTest.so: (null):0 ((null)): qrc:/main.qml:35 Type Dialog unavailable
    W libAppTest.so: file:///data/data/org.qtproject.example.AppTest/qt-reserved-files/qml/QtQuick/Dialogs/DefaultDialogWrapper.qml:45 "qml": no such directory
    

    Here is my source code:

    import QtQuick 2.7
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.3
    import QtQuick.Dialogs 1.2
    
    ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
        Page {
            Label {
                text: qsTr("Hello")
                anchors.centerIn: parent
    
                MouseArea {
                    anchors.fill: parent
                    onClicked: {
                        dialog.open();
                    }
                }
            }
        }
    
        Dialog {
            id: dialog
            title: "Title"
        }
    }
    

    How do I get it to work?

    E 1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @kimdata Perhaps it's related to QTBUG-60918.

      157

      1 Reply Last reply
      2
      • K kimdata

        I use Qt Quick Dialog on my Android app, and the app quits as soon as I run it with the following error:

        W libAppTest.so: (null):0 ((null)): QQmlApplicationEngine failed to load component
        W libAppTest.so: (null):0 ((null)): qrc:/main.qml:35 Type Dialog unavailable
        W libAppTest.so: file:///data/data/org.qtproject.example.AppTest/qt-reserved-files/qml/QtQuick/Dialogs/DefaultDialogWrapper.qml:45 "qml": no such directory
        

        Here is my source code:

        import QtQuick 2.7
        import QtQuick.Controls 2.0
        import QtQuick.Layouts 1.3
        import QtQuick.Dialogs 1.2
        
        ApplicationWindow {
            visible: true
            width: 640
            height: 480
            title: qsTr("Hello World")
        
            Page {
                Label {
                    text: qsTr("Hello")
                    anchors.centerIn: parent
        
                    MouseArea {
                        anchors.fill: parent
                        onClicked: {
                            dialog.open();
                        }
                    }
                }
            }
        
            Dialog {
                id: dialog
                title: "Title"
            }
        }
        

        How do I get it to work?

        E Offline
        E Offline
        Eeli K
        wrote on last edited by
        #3

        @kimdata Can you use the Dialog which is directly in Controls since 2.1? Just delete import ...Dialogs 1.2 and change import ...Controls 2.2. (version 2.2 is used in the current 5.9 documentation.)

        1 Reply Last reply
        2
        • K Offline
          K Offline
          kimdata
          wrote on last edited by
          #4

          @Eeli-K Thanks. I removed import QtQuick.Dialogs 1.2, modified to import QtQuick.Controls 2.2 and it works.

          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