6

So let's say I do something like this:

QIcon myIcon(":/resources/icon.ico");

How can I later determine the path for that icon, e.g.

QString path = myIcon.getPath();

The problem is, there is no getPath() member, and I can't find anything similar, but surely there must be a way!

I guess I could inherit the QIcon class and add this functionality, but it's probably built in and I'm overlooking it?

ymoreau
  • 3,402
  • 1
  • 22
  • 60
y2k
  • 65,388
  • 27
  • 61
  • 86

1 Answers1

15

The filename isn't stored in QIcon, it's only used for constructing the image.

codelogic
  • 71,764
  • 9
  • 59
  • 54