On Sunday, 2012-12-16, Shawn Rutledge wrote:

> It doesn't bother me to put icon names in the C++ code, either.  The
> widget way of using resources works great, because you don't have to
> think about the path to the image on disk.  If you don't want to use
> resources then some kind of image provider should be another way to
> abstract away the details of loading, so that when creating an action
> in C++ you only need to give the name of the icon.  If you have a
> naming convention, maybe even that can have an automatic default: you
> just name the action itself, and the matching icon will be found by
> that name without having to set up the mapping anywhere.

While it is theoretically possible to create icons during runtime e.g. using 
QPainter, I think that icon-by-name is by far the more often used approach.
When was the last time anyone so icons not being loaded by name (from theme, 
resource or file)?

Cheers,
Kevin

-- 
Kevin Krammer | [email protected] | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to