from PySide2 import QtGui main_window = substance_painter.ui.get_main_window()for child in main_window.children(): if child.objectName() == 'plugin_toolbar': child.addAction("BTN")