committed by
Yorik van Havre
parent
ecaa200ad2
commit
5b3ab4759d
@@ -96,6 +96,17 @@ void TextEdit::keyPressEvent(QKeyEvent* e)
|
||||
}
|
||||
}
|
||||
|
||||
void TextEdit::wheelEvent(QWheelEvent* e)
|
||||
{
|
||||
// Reimplement from QPlainText::wheelEvent as zoom is only allowed natively if !isReadOnly
|
||||
if (e->modifiers() & Qt::ControlModifier) {
|
||||
float delta = e->angleDelta().y() / 120.f;
|
||||
zoomInF(delta);
|
||||
return;
|
||||
}
|
||||
QPlainTextEdit::wheelEvent(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Completes the word.
|
||||
*/
|
||||
|
||||
@@ -70,6 +70,7 @@ Q_SIGNALS:
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void wheelEvent(QWheelEvent* e) override;
|
||||
|
||||
private:
|
||||
void createListBox();
|
||||
|
||||
Reference in New Issue
Block a user