View Full Version : Qt Picture change
Raymond
21st February 2010, 06:07
I would like to achieve the picture as button, when the mouse moves to the location of the picture, the picture switches into another picture. Please help me, is there any example lend me refer to the following? Thanks
Lykurg
21st February 2010, 09:55
Set a image to QPushButton and use css :hover to change the image by qproperty-icon. Or subclass QLabel/QWidget/QPushButton, and reimp QWidget::enterEvent() and QWidget::leaveEvent() to change the image.
Raymond
22nd February 2010, 03:19
Set a image to QPushButton and use css :hover to change the image by qproperty-icon. Or subclass QLabel/QWidget/QPushButton, and reimp QWidget::enterEvent() and QWidget::leaveEvent() to change the image.
Thank you very much!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.