Created
          June 12, 2019 19:33 
        
      - 
      
- 
        Save icecr4ck/eb5b9e4ecb9326c5f16a24f4809a5832 to your computer and use it in GitHub Desktop. 
Revisions
- 
        icecr4ck created this gist Jun 12, 2019 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ import sys from PySide2.QtWidgets import (QApplication, QDialog, QPushButton, QLabel, QHBoxLayout) from PySide2.QtCore import Qt from binaryninjaui import (UIAction, UIActionHandler, Menu) class GreatUI(QDialog): def __init__(self, parent=None): super(GreatUI, self).__init__(parent) self.setWindowModality(Qt.NonModal) self.title = QLabel(self.tr("Great UI")) self.setWindowTitle(self.title.text()) self.testButton = QPushButton(self.tr("Press Me")) buttons = QHBoxLayout() buttons.addWidget(self.testButton) self.setLayout(buttons) self.testButton.clicked.connect(self.test) def test(self): print("GREAT SUCCESS") def launchPlugin(context): gui = GreatUI() gui.exec_() if __name__ == '__main__': app = QApplication(sys.argv) gui = GreatUI() gui.exec_() sys.exit(app.exec_()) else: UIAction.registerAction("Great UI") UIActionHandler.globalActions().bindAction("Great UI", UIAction(launchPlugin)) Menu.mainMenu("Tools").addAction("Great UI", "GUI")