Hi
How do display icons on image, when i am moving curser on image..
please suggest me to set icons on image
Thanks
Yuvaraj R
Hi
How do display icons on image, when i am moving curser on image..
please suggest me to set icons on image
Thanks
Yuvaraj R
have a look at QPainter::drawImage or QPainter::drawPixmap.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Hi
Just had gone through that one...
can anybody post the sample code here
Thanks
Yuvaraj R
you should write something like this
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Don't mistake me
How do i run this code
Thanks
yuvaraj
like this
Qt Code:
#include <QtGui> #include <QApplication> int main(int argc, char **argv) { QLabel label; label.setPixmap(pixmap); label.show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Hi
Thanks spirit
How can i set the icons ,it si visible only when curser is moving on image
Please suggest me
Thanks
Yuvaraj
R
use code above in mouseMove or keyPressEvent.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
thanks for your reply
can i set actions for label to display that
Dont mistake me, but do you use Qt Assistant ? or see Qt Demos ?
As for your problem, you could use a QToolButtonor QPushButton, and set the icon when mouse is over it. You will need to subclass them, and as spirit said, override the mouse events.
If you are using label, you could make button as a child of label, and show/hide when the user hovers over a given area. For this too, you will need to subclass QLabel
Hi
I can we display the image using push button and tool button
Bookmarks