Skip to content

Integration with pyqt #325

Answered by yaythomas
guixiaocai asked this question in Q&A
Jul 14, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

If you just want to see the pypyr output (i.e what you see at the console when you $ pypyr mypipeline), you can capture stdout and stderr from PyQt as suggested in option 2 above. But you would still have to invoke pypyr in a background thread not to lock up the UI.

To do this, use QThread - tutorial here: https://realpython.com/python-pyqt-qthread/

You can use signals and slots to interact between pypyr steps and your GUI by passing in your Signal objects to the pipeline and invoking them from a custom step:

So when you invoke pypyr, it'll go something like this:

class Worker(QObject):
    progress = Signal(str)
    completed = Signal(str)

    @Slot(str)
    def run(self, pipeline_name, i…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@guixiaocai
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by guixiaocai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants