Question

Is there a way to let user choose what icon theme to use , when using QFIleIconProvider ? It looks like Qt uses "gnome" by default , i wanted to change this behavior.

Was it helpful?

Solution

The icon style is dependent on what is returned from QApplication::style(). So if you change the application style using QApplication::setStyle(), you'll get a different set of icons too. If you want a different theme than the application style, you need to subclass QFileIconProvider and set you custom icon provider with QFileSystemModel::setIconProvider(yourCustomIconProvider).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top