How can I launch some custom gui_qt tool from an extension plugin? #1339
Unanswered
user202729
asked this question in
Plugin Support
Replies: 1 comment
-
For For the rest, there's this method. This is less bad than the previous method (no private member access!), but still relies on the structure of the GUI and from PyQt5.QtWidgets import QAction, QApplication
from plover.gui_qt.main_window import MainWindow
main_window,=[x for x in QApplication.instance().topLevelWidgets() if isinstance(x, MainWindow)]
action,=[x
for x in main_window.toolbar.children()
if isinstance(x, QAction) and x.text()=="Suggestions"
]
action.triggered.emit() By the way, you can hide some buttons by right-clicking at the toolbar and select one of them, although this method still works correctly in that case. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(title.)
Such as the spectra lexer or the plugin manager.
Remark: this was for #1323 , but given this (there's no simple way), it might be better to just launch a subprocess.
Beta Was this translation helpful? Give feedback.
All reactions