PDA

View Full Version : StandardPixmap is missing important icons



claudio
17th July 2007, 21:15
If you want to do a system-independant toolbar, you need save / print / cut / copy / paste / exit ... icons and they have a different look on each system. Is it true that they're missing in QStyle::standardIcon? Is Trolltech going to implement a bigger set of icons in future?

Thanks...
Claudio

jpn
19th July 2007, 13:44
You could try sending a suggestion to the Task-Tracker (http://www.trolltech.com/developer/task-tracker). ;)

KShots
19th February 2014, 17:25
Qt did something strange with this. I had been getting used to using the method you're talking about to fill my apps with standard icons independent of architecture... then I found that QIcon has its own set of standard icons in addition to QStyle. Why did they do that??? At any rate, for all the icons you're talking about, most of them exist in QIcon::fromTheme. For my apps, I use the theme icon when I can, and I pass a QStyle "standardIcon" as a fallback to QIcon::fromTheme.

In my opinion, putting the same functionality in two different places with different levels of implementation is... well... dumb? Don't they both pull icons from the same place?

The below are most of the strings identifying the icons you're looking for for the QIcon::fromTheme function:

edit-clear The icon for the clear action.
edit-copy The icon for the copy action.
edit-cut The icon for the cut action.
edit-delete The icon for the delete action.
edit-find The icon for the find action.
edit-find-replace The icon for the find and replace action.
edit-paste The icon for the paste action.
edit-redo The icon for the redo action.
edit-select-all The icon for the select all action.
edit-undo The icon for the undo action.

anda_skoa
19th February 2014, 20:47
For my apps, I use the theme icon when I can, and I pass a QStyle "standardIcon" as a fallback to QIcon::fromTheme.

Yes, that is a reasonable approach.



In my opinion, putting the same functionality in two different places with different levels of implementation is... well... dumb? Don't they both pull icons from the same place?

Not all platforms have support for icon themes. Application developers need to be aware that QIcon::fromTheme() can fail to produce a result.
It is then the choice of the developer if they fall back to icons provided with their application, e.g. from a qt resource, or from the style.

Cheers,
_