在 2013年7月19日星期五UTC+8下午6时44分08秒,Justin Israel写道:
> I'm failing to see why it causes the recursion error (its probably too late 
> at night for me to be looking at code). But it shouldn't be an issue to catch 
> it and pass. Your main widget doesn't really have anything to do for a wheel 
> event on its own anyways:
> 
> 
> 
> 
> class BoxLayout(QWidget):
> 
> 
>     def __init__(self, parent=None):
>         super(BoxLayout, self).__init__(parent)
>         self.resize(100, 300)
> 
> 
> 
>         ok = QPushButton("OK", self)
>         cancel = QPushButton("Cancel", self)
> 
> 
>         self.textEdit = QTextEdit("x"*10000, self)
>         self.textEdit2 = QTextEdit("y"*10000, self)
> 
>         
>         vbox = QVBoxLayout()
>         vbox.addWidget(self.textEdit)
>         vbox.addWidget(self.textEdit2)
>         vbox.addWidget(ok)
>         vbox.addWidget(cancel)
> 
>         self.setLayout(vbox)
> 
> 
>     def wheelEvent(self, event):
>         try:
>             if event.type() == event.Wheel:
>                 self.textEdit.wheelEvent(event)
> 
>                 event.accept()
>         except RuntimeError:
>             pass
> 

the error is still there ,have you tried your code ?

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to