Houdini7 Posted June 6, 2020 Share Posted June 6, 2020 Hi, i want to extend houdinis UI and I must say the whole UI Api is really a mess. pyqt, pyside, pyside2, qt, python, shiboken. really? why so complicated. and why on earth is the documentation so bad. okay, rent over. what i want to do: 1) i want the edit box (parameter) under the cursor in the parameter window. the unique name or path of the edit box, so that i can later set the value of the edit box (parameter). the edit box should be a QLineEdit, correct? propably not, because everything in the API is really awkward. 2) i wanted to solve problem 1) with the following attempt. get cursor position, get param window, loop over the children and check over which child the cursor is located. Okay my test code gets the param widget and then tries to get the children. it has a QVLayoutBox as a direct child. but the QVLayoutBox is empty ???? why? how can I access the childrens? import shiboken2 import PySide2.QtWidgets as qtw from PySide2 import QtGui as qtg app0 = qtw.QApplication.instance() #widget = app0.widgetAt(qtg.QCursor().pos()) allWidgets = app0.allWidgets() for w in allWidgets: if w.windowTitle() == "parmdialog": parmWidget = w print "found" break vlbox = parmWidget.children()[0] print vlbox.children() #why is the count 0 ???? Hope someone can help me. Thanks! Quote Link to comment Share on other sites More sharing options...
Houdini7 Posted June 9, 2020 Author Share Posted June 9, 2020 Has no one an idea? Please help me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.