QT Designer/ slot method/ py script help
-
Hi all. Noob here. Just a question about having buttons built in QT DESIGNER run python scripts.
How do I do it? do I have to export the .ui and convert it to .py and THEN insert the script or reference to a .py script I want to run?... or can I just add the script or code directly, somewhere, in the SLOT EDITOR?
Is the QT DESIGNER workflow that you make the interface first, THEN add the code after exporting the .ui and converting it to .py?
And if so, can you open the .py in QT DESIGNER? Do you have to convert it back to a .ui file, first?
I've watched some tutorials but there is no clear answer. Any help is appreciated.
-
Hi and welcome to devnet,
No, no coding in Designer.
The workflow is:- you create the UI file
- you generate the Python from it
- you have a second Python file that makes use of the generated file to create the widget and that will contain the code you want to execute.
-
Hi and welcome to devnet,
No, no coding in Designer.
The workflow is:- you create the UI file
- you generate the Python from it
- you have a second Python file that makes use of the generated file to create the widget and that will contain the code you want to execute.
-
You're welcome !
Since your question is answered, please mark the thread as solved using the cog button or the three dot menu beside the answer you deem correct so other forum users may know a solution has been found :-)