PySide - Access network editors qwidget

   180   0   1
User Avatar
Member
13 posts
Joined: Aug. 2019
Offline
I'm creating a pyside gui where I want to be able to connect an event filter in order to register drag and drops from
my custom ui to houdini, maya and nuke. If I connect it to the main window(hou.qt.mainWindow()) the event only gets triggered when I hover or drop on top of the top bar and not the rest of houdini. So I'm guessing there must be a better place to connect the event filter to.

I'm wondering if it would be possible to connect the event filter to the network editor?
And if it is how would I go about finding the network editors widget?
And how would I make sure it's only in /stage or /obj?

In nuke for example I could access the "Node Graph" widget like this:
for widget in QtWidgets.QApplication.instance().allWidgets():
    if widget.windowTitle() == 'Node Graph':
        main_widget = widget
And then connect the event filter to it so as to register any drag and drops only on the node graph part of the application.

I've tried googling like crazy but can't find how to solve this problem. Any help would be appreciated.
  • Quick Links