"Buttons have icons", round N+1
René J.V. Bertin
rjvbertin at gmail.com
Sun Dec 13 15:20:19 UTC 2015
Hi,
There has been some discussion around one of my RRs concerning how to respect KDE's ShowIconsOnPushButtons and Qt's SH_DialogButtonBox_ButtonsHaveIcons style hint.
The ultimate way would be in the style that does the actual drawing, but that is probably not the one with the smallest overhead.
Until now this discussion focussed on kdelibs4support, but I just learned that e.g. KMessageBox can also show buttons that have icons despite ShowIconsOnPushButtons being false. This happens for instance in the dialog Kate puts up when asked to close a file with unsaved changes.
The dialog in question is a KMessageBox with a few KStandardGuiItems.
In a comparable situation, Qt's own code simply doesn't add the standard icons to the buttons being created, when SH_DialogButtonBox_ButtonsHaveIcons is false.
KMessageBox isn't a QDialogButtonBox, but shouldn't it do the same? Would it be acceptable to remove the icon in the appropriate KStandardGuiItem methods, or even in KGuiItem, when SH_DialogButtonBox_ButtonsHaveIcons is false, or (rather) when ShowIconsOnPushButtons is false?
Regards,
René
More information about the Kde-frameworks-devel
mailing list