[PyKDE] Can I creat a widget which can click and has a erose edge?

Matt Newell newellm at blur.com
Wed Mar 7 17:00:40 GMT 2007

On Wednesday 07 March 2007 02:08, Marco wrote:
> A QFrame seem can set a un-normal edge, but how to let it clickable?

import PyQt4.QtGui

class ClickableFrame( PyQt4.QtGui.QFrame ):
	def __init__(self,parent=None):

	def mouseReleaseEvent( self, event ):
		print "Clicked!"

or if you want all the QPushButton stuff(clicked signals, etc), you could 
override the paintEvent, and just call PyQt4.QtGui.QFrame.paintEvent(self, 
event), so that it is drawn like a normal frame.


More information about the PyQt mailing list