UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    "Type FileDialog unavailable"

    App Development
    2
    2
    89
    Loading More Posts
    • 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.
    • U
      utuser
      last edited by utuser

      I'm having problems using FileDialog component in Main.qml file.
      When I use the FileDialog {} anywhere in the QML file and build the project in desktop mode, the terminal returns:

      qrc:/Main.qml:111:17: Type FileDialog unavailable
      file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:41:1: module "QtQuick.Controls" version 1.2 is not installed 
           import QtQuick.Controls 1.2 
           ^
      

      and a blank screen is displayed (also on a phone).
      It works when built in qtcreator.

      I'm almost sure I have all the necessary packages installed and imported.
      The same libraries are used in sturmreader app document importer file:
      https://gitlab.com/TronFortyTwo/sturmreader/-/blob/master/ui/qml/ImporterPortable.qml

      My project is using QML and C++.

      I wonder if it means, that some different default version of QtQuick.Controls is set somewhere in the clickable or project settings.

      Thanks for help in advance

      1 Reply Last reply Reply Quote 0
      • K
        kugiigi
        last edited by

        As far as I know, QQC1 isn't available in UT Only QQC2. Also, file dialog isn't what works in UT. You'll have to use ContentHub

        1 Reply Last reply Reply Quote 0
        • First post
          Last post