On 2023-04-18 12:00, Gaurav Kumar wrote:
I was searching for a way to load icons in table. And got the yast example for this in git https://raw.githubusercontent.com/yast/yast-ycp-ui-bindings/master/examples/...
I tried executing this example on SLES 15 SP4 there icon Name are loading but icons are not loading in table.
The way icons are loaded changed; it now tries several locations: - A theme icon provided by the desktop, if there is one by that name - A compiled-in icon (using Qt's resource system) - A full path. See also https://github.com/libyui/libyui/blob/master/libyui-qt/src/YQUI.cc#L673-L700 It does work in tables; for example, the partitioner has a "Type" column that displays an icon for the device type. Let me see if I can come up with a simple example, or if I can fix that Table-icons.rb example that you tried. Unfortunately, this is one of many examples that was not manually updated / beautified after the big YCP -> Ruby conversion. Kind regards -- Stefan Hundhammer <shundhammer@suse.de> YaST Developer SUSE Software Solutions Germany GmbH GF: Ivo Totev; HRB 36809, AG Nürnberg