简体   繁体   中英

How to get big icons on QFileDialog?

I'm working on a Qt UI that will run on a touchscreen. At some point it will be useful to select files, in (probably) a QFileDialog. But little icons on a QFileDialog leads to a terrible touch-user experience, I'd like them to be bigger, so the user doesn't get crazy trying to navigate in the filesystem. Actually, I'm searching documentation to see if there is a way through css, but haven't seen yet which target/propery to use.

Given the doc of QFileDialog class:

QFileDialog::Detail 0 Displays an icon, a name, and details for each item in the directory. QFileDialog::List 1 Displays only an icon and a name for each item in the directory.

You can't set icon size this way. I recommend you to set a custom icon provider on the QFileDialog .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM