IIIROFLIII Posted July 30, 2019 Share Posted July 30, 2019 Hi everyone, I wonder if someone has already succeed to load a .ui file made with qtdesigner, but the particular case is that .ui file is inside a HDA in Extra Files. I've tried with opdef but it seems to be not working. the command I used was QUILoader().load(path.ui) (and it's working if the .ui file is on disk) Thanks to all Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted August 2, 2019 Share Posted August 2, 2019 Check out the attached file Cheers, Alex emedded_qt_ui.hdanc Quote Link to comment Share on other sites More sharing options...
IIIROFLIII Posted August 2, 2019 Author Share Posted August 2, 2019 Hi Salkerx777, thanks for your reply. I just checked your hda and it seems to have what i'm missing, nevertheless when i try to launch the ui there is this error (see attachment) From my side I find a "solution", i can get the content of the ui with hou.readFile(opdef....), then write this content on the desktop in a ui file and pointing on it when launching, then deleting after the ui.show() (so it's transparent for the user) But your solution is more convenient^^, and i'm very interesting to work with it Quote Link to comment Share on other sites More sharing options...
animknight Posted August 2, 2019 Share Posted August 2, 2019 Never thought about loading the code as a buffer. That's really cool Alex. Cheers -J Quote Link to comment Share on other sites More sharing options...
IIIROFLIII Posted August 2, 2019 Author Share Posted August 2, 2019 it works for you animknight? Quote Link to comment Share on other sites More sharing options...
animknight Posted August 2, 2019 Share Posted August 2, 2019 Nope. Getting the same error -J Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted August 2, 2019 Share Posted August 2, 2019 I dunno guys, just tried it on a different computer and it also works. Both are Linux machines though. In general, you want to generate Python code from your ui files. See this: https://doc.qt.io/qtforpython/tutorials/basictutorial/uifiles.html Houdini ships with pyside2-uic though I couldn't find the wrapper script for it, you can call it directly like so: hython $HFS/python/lib/python2.7/site-packages-ui-forced/PySide2/scripts/uic.py dialog.ui -o dialog.py Quote Link to comment Share on other sites More sharing options...
IIIROFLIII Posted August 5, 2019 Author Share Posted August 5, 2019 ok thanks stalkerx777 :-) 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.