<html>
<head>
<title>HTML Document</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
</head>
<body>
<div id="hover-id">
Hello World
</div>
<script>
jQuery(document).ready(function($){
$(document).on('mouseover', '#hover-id', function(){
$(this).css('color','yellowgreen');
});
$(document).on('mouseout', '#hover-id', function(){
$(this).css('color','black');
});
});
</script>
</body>
</html>
# convert image file into pixmap
self.pixmap_image = QtGui.QPixmap(self.filename)
# create painter instance with pixmap
self.painterInstance = QtGui.QPainter(self.pixmap_image)
# set rectangle color and thickness
self.penRectangle = QtGui.QPen(QtCore.Qt.red)
self.penRedBorder.setWidth(3)
# draw rectangle on painter
self.painterInstance.setPen(self.penRectangle)
self.painterInstance.drawRect(xPos,yPos,xLen,yLen)
# set pixmap onto the label widget
self.ui.label_imageDisplay.setPixmap(self.pixmap_image)
self.ui.label_imageDisplay.show()