Issue with Build Button Functionality in Qt Window HoudiniFx
-
I’m new to Qt and facing an issue while writing in PySide2 for Houdini UI.. I’ve written a script in Houdini that creates a window with two buttons: Build and Close.
Clicking the Build button opens another window with the same two buttons (Build and Close).
The Build button works fine the first time, opening the new window. However, subsequent clicks on the Build button don’t seem to work at all.
Additionally, each click on the Build button is counted, and when the Close button is clicked, it prints the total number of clicks. This behavior happens regardless of whether you close the window from the main or subsequent windows.
Could someone please explain why the Build button stops functioning after the first click? I’d appreciate any help or guidance!
https://github.com/MaheshFXTD/shotbuilderThank you!
-
@Mahesh108 Your link doesn't work.
Did you verify that the slot connected to the build button is called? -
@jsulm Thanks for replying, Yes build button is connected to the slot.
This code I am writing in HoudiniFx software, seems like there are some rules which I am not aware about.
But this code works well in Python3.1 in windows machine.
The link is marked to private now.
main.py script is for HoudiniFx
windows_main.py is for python3.1 -
@Mahesh108 said in Issue with Build Button Functionality in Qt Window HoudiniFx:
Yes build button is connected to the slot
This does not answer my question.
Again: is the slot connected to the button called when you click it?"But this code works well in Python3.1 in windows machine" - and where does it not work?
You will provide more information if you want to get better support. -
There is a CG software HoudiniFx, which supports PySide2 and I am writing code for that.
This is site for HoudiniFx.
https://www.sidefx.com/
Documentation for PySide2 in Houdini.
https://www.sidefx.com/docs/houdini/hom/cb/qt.html -
So If I simplify the issue even more, when I close the window by using self.close or self.reject in the buttons. self.button.clicked.connect(self.close) like this. Or If I directly close the window, it is printing 'found files' from collect_files function.
I also tried defining closeEvent function to close the window but before closing every time it's printing the found files first.
Any suggestion which could explain what is causing this behavior will help me investigate effectively. Thanks