Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Like button can we set id for pixmap or image?
If we are talking about objectName here then no, as QPixmap and QImage do not inherit from QObject.
What do you mean, when you speaking "id". Can you explain more, please?
id is an integer identifier of any widget or in this case i am talking about id of image.
No, but you can't do that with QPushButton either. Can you elaborate on this?
What for do you want id?
Two ways
Are you using a property as your id?
with QPushbutton we can't use but with Qbuttongroup we can add to it. I have an image in Qpixmap i want to access that image through a unique id.
This is a feature unique to QButtonGroup.
See Vass' post for a solution. Depending on how you manage the lifetime of your objects you might use QHash<int, QImage*> instead.