I've got a QPlainTextEdit widget with some text in it. When the user uses ctrl + mouse wheel, the text changes the size.
i'd like to disable this behavior. Is there a way to do that?
Currently the widget is set as read only.
n
I've got a QPlainTextEdit widget with some text in it. When the user uses ctrl + mouse wheel, the text changes the size.
i'd like to disable this behavior. Is there a way to do that?
Currently the widget is set as read only.
n
My guess is that QPlainTextEdit::wheelEvent() is where the zoom in / out originates. It you derive a new class from QPlainTextEdit and override this method, you can prevent the zooming. When ctrl is pressed, you call accept() on the event, otherwise you call the base class method to let the normal handling occur (such as scroll up / down).
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks