I forget off-hand if there is a better way without looking for myself right now, but you can just loop over the buttons and check if their rect intersects the one form your rubberband:
selection = QtCore.QRect(0,0,500,500) button1 = QtCore.QRect(20,20,100,20) print selection.intersects(button1) # True On Mon, Dec 10, 2012 at 9:07 AM, Rishis3D <[email protected]> wrote: > i'm implemented the QRubberBand class with three mouse event to do draw > rectangle box inside my ui. but i dont know how to get my buttons within > that rectangle area using QRect class > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected].
