I am using a FileDialog supposedly from QtQuick.Dialogs in one of my QML files. When I open the context help in QtCreator however, it shows me the entry for FileDialog from Qt Labs, no the one from Qt Quick Dialogs as expected. I have no mention of Qt Labs anywhere in my project. Why doesn't it use the FileDialog I tell it to?
I am using QtCreator 4.6.2 with Qt 5.11.1 on Ubuntu 18.04.
Here are the relevant code snippets:
LoadFileDialog.qml:
import QtQuick 2.9
import QtQuick.Dialogs 1.3
FileDialog {
id: loadFile
folder: "."
selectExisting: true
selectMultiple: false
title: "Please select file to load"
onAccepted: {
//[...]
}
onRejected: {
//[...]
}
}
Import statements in *.pro file:
QT += qml quick gui widgets
CONFIG += c++11
The application runs fine on my Ubuntu 18.04 system, from QtCreator using Qt 5.11.1 as well as stand-alone using the system's Qt 5.9. As soon as I try to run it on an Ubuntu 20.04 system with Qt 5.12 on it, it complains about not finding the FileDialog. I have no idea what library is missing to make it work either.
EDIT: The output I get when trying to run the application in Ubuntu 20.04 is:
qt5ct: using qt5ct plugin
QQmlApplicationEngine failed to load component
qrc:/main.qml:193 Type LoadFileDialog unavailable
qrc:/LoadFileDialog.qml:4 Type FileDialog unavailable
file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:47 module "Qt.labs.folderlistmodel" is not installed
Thanks.