QML FileDialog size
Unsolved
QML and Qt Quick
-
I use on arm linux (raspberryPi, weston 13.03) in QML (Qt 6.8.1) such code
FileDialog { id: fileDialog title: qsTr("Select Firmware File") nameFilters: ["Firmware files (*.bin)", "All files (*)"] onAccepted: { if (fileDialog.selectedFile) { fw.loadFirmWareFromFile(fileDialog.selectedFile) loadFW.open() } else { console.log("No file selected") } } onRejected: { console.log("File selection was canceled") } }
FileDialog fit all screen. Its not usable.
Can I specify width and height of FileDialog, font size? -
You can play with the font size. The easiest way would be to use the QT_FONT_DPI environment variable. Try a bunch of different values until you get a good fit. Maybe start with a value of 96 and go down. (I don't know what your actual DPI is.)