tags:

views:

56

answers:

1

I sucessfully added a QLabel widget into the FormWindow and set a pixmap in code, but when examine the property box the pixmap filepath field was empty even if the image did get loaded properly.

The QPixmap struct has no members holding the path, so this info must be somewhere in the Property Box. How can I access it?

If the pixmap filepath property field is left blank, then it won't be saved correctly to the .ui file. Next time you bring it back, the label will exist but no image will be shown.

I guess some internal slot & signals things has to be emitted or triggered, but just can't find a way to do it. Any help is appreciated.

+2  A: 

QPixmap does not keep file path (http://doc.trolltech.com/3.3/qpixmap.html#QPixmap-5). If you want to have it each time you access your QPixmap, you need to subclass it and add the file path as member

Patrice Bernassola