+void MultiLineEdit::contextMenuEvent(QContextMenuEvent* event)
+{
+ QMenu* menu = createStandardContextMenu();
+ menu->addSeparator();
+
+ auto action = menu->addAction(tr("Auto Spell Check"));
+ action->setCheckable(true);
+ action->setChecked(highlighter()->isActive());
+ connect(action, &QAction::toggled, this, &MultiLineEdit::setSpellCheckEnabled);
+
+ menu->exec(event->globalPos());
+ delete menu;
+}
+
+#endif