Jump to content

Python Panel hou.ui problem


DominikL

Recommended Posts

Hello,

i am new to this and i don't understand why hou.ui functions stop working when you reopen a panel. Example video.
The example code that i used:

from PySide2 import QtWidgets

class testUi(QtWidgets.QWidget):
    def __init__(self):
        QtWidgets.QWidget.__init__(self)
        
        button1 = QtWidgets.QPushButton()
        layout = QtWidgets.QVBoxLayout()
        layout.addWidget(button1)
        self.setLayout(layout)
        button1.clicked.connect(openSel)
        
def openSel():
    list1 = ["1","2","3"]
    sel1 = hou.ui.selectFromList(list1, exclusive=True)
    print sel1
def createInterface():
    return testUi()

 

Link to comment
Share on other sites

  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...