Bug 427434

Summary: qml: icon picker dialog with custom path?
Product: [Plasma] plasmashell Reporter: grannie
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde, plasma-bugs
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description grannie 2020-10-08 07:48:24 UTC
I'm using the following snippet for my plasmoid:

IconDialog {
        id: iconDialog
        onIconNameChanged: {
            iconPreview.source = iconName
            iconChanged(iconName)
        }
        customLocation:'/path/to/icons'
    }

The intention is obviously to open an iconPicker at a specific path. It works somehow however only if the user changes the radiobutton manually from "system icons" to "other icons"

Is there a way to define programatically that the icon picker is loaded with "other icons"?
Comment 1 David Redondo 2020-10-08 09:52:02 UTC
I think you  want "user:true".

This bad name comes from KiconDialog
https://api.kde.org/frameworks/kiconthemes/html/classKIconDialog.html
for which IconDialog is just a wrapper
https://invent.kde.org/frameworks/kdeclarative/-/blob/master/src/qmlcontrols/kquickcontrolsaddons/icondialog.cpp