QML FileDialog size
-
wrote on 29 Oct 2024, 12:40 last edited by Kuzma30
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? -
wrote on 29 Oct 2024, 13:07 last edited by
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.)
-
wrote on 30 Oct 2024, 08:48 last edited by
-
wrote on 1 Nov 2024, 12:25 last edited by
Some more info.
I use kiosk-shell mode for weston (I need use one app in full screen mode). When I change it to desktop-shell, dialog size is normal, but I see maximize, minimize and close buttons for app.
1/4