when you turn the mouse wheel while the mouse is not on the QTextEdit ,the 
scroll bars will not move in such case ,but I still want to move the scroll 
bars by mouse wheel ,so how can I implement this function ?
I know some software like Microsoft Word have this feature 


import sys
from PyQt4 import QtGui
class BoxLayout(QtGui.QWidget):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.resize(100, 300)
       
        ok = QtGui.QPushButton("OK")
        cancel = QtGui.QPushButton("Cancel")
        
        vbox = QtGui.QVBoxLayout()
        vbox.addWidget(QtGui.QTextEdit("""This function returns true if the 
contents of the MIME data object, specified by source , can be decoded and 
inserted into the document. It is called for example when during a drag 
operation the mouse enters this widget and it is necessary to determine whether 
it is possible to accept the drag and drop operation.
 
"""))
        vbox.addWidget(ok)
        vbox.addWidget(cancel)
 
        self.setLayout(vbox)
        
app = QtGui.QApplication(sys.argv)
qb = BoxLayout()
qb.show()
sys.exit(app.exec_())

-- 
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