Skip to content

Can/should plugins modify the text in the status bar? #4677

Answered by psifertex
psifertex asked this question in API
Discussion options

You must be logged in to vote

We don't have any convenient helper UIs for this, nor do we plan to add any as we believe it's not a good UI design pattern to encourage, however you can easily do this using standard QT code like:

from PySide6.QtWidgets import QLabel
from binaryninjaui import UIContext
from binaryninja import execute_on_main_thread

def updateStatus():
  # There are some garbage collection issues if you don't
  # save references to at least some of the below which is why 
  # they're being captured to variabes
  ctx = UIContext.activeContext()
  mw = ctx.mainWindow()
  sb = mw.statusBar()
  sb.addWidget(QLabel("TEST"))

# DO NOT try to directly interact from the UI on any thread from the main thread
exec…

Replies: 1 comment

Comment options

psifertex
Oct 18, 2023
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by psifertex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant