FileDialog not working anymore
Solved
QML and Qt Quick
-
Hey, I am using
FolderDialog
andFileDialog
fromQt.labs.platform
, but calling.open()
on them, does not open them anymore. It used to work in Qt5, but doesn't with Qt6.This is how I declare them:
FileDialog { id: importFilesDialog acceptLabel: "Import" fileMode: FileDialog.FileMode.OpenFiles folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation) }
Does someone have an idea why this doesn't work.
(I am on a KDE distro if this plays a role.) -
I have fixed it by linking against the
widgets
module and changing myQGuiApplication
toQApplication
-
@Creaperdown
Your code worked for me, I am using Mint Xfce.
However, I had to change FileDialog.FileMode.OpenFiles to FileDialog.OpenFiles, because I got a warning. -
I have fixed it by linking against the
widgets
module and changing myQGuiApplication
toQApplication
-