Add tool tip to REPL button in python editor

The individual tooltips on the menu items might not be shown (possibly
depending on platform).

Change-Id: I0adb3f938de23dad4b70fa1f73a0b6a277b0386c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Eike Ziller
2021-01-08 16:14:38 +01:00
parent 5cdcb872df
commit 7644dae937

View File

@@ -87,6 +87,10 @@ static QWidget *createEditorWidget()
replButton->setProperty("noArrow", true);
replButton->setText(QCoreApplication::translate("Python", "REPL"));
replButton->setPopupMode(QToolButton::InstantPopup);
replButton->setToolTip(QCoreApplication::translate(
"Python",
"Open interactive Python. Either importing nothing, importing the current file, or "
"importing everything (*) from the current file."));
auto menu = new QMenu(replButton);
replButton->setMenu(menu);
menu->addAction(Core::ActionManager::command(Constants::PYTHON_OPEN_REPL)->action());