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):
                PyQt4.QtGui.QFrame.__init__(self,parent)

        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.

Matt

_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to