Real-time information window auxiliary to the main app
-
Hello! I have built I pyqt5 application that does some things. The problem is that in order to identify if an action is finished I mostly read prints I have put inside the code. The problem I need to do it more formal, so auxiliary to the main window to open a secondary window that will show "this action happened", "that action happened". Obviously, I do not want to reinvent the wheel. Is there something that I could use in order to print real-time messages in parallel as the main application does the work? Thank you for your time....
-
Hello! I have built I pyqt5 application that does some things. The problem is that in order to identify if an action is finished I mostly read prints I have put inside the code. The problem I need to do it more formal, so auxiliary to the main window to open a secondary window that will show "this action happened", "that action happened". Obviously, I do not want to reinvent the wheel. Is there something that I could use in order to print real-time messages in parallel as the main application does the work? Thank you for your time....
@john_hobbyist
Create a modelessQDialog, put aQTextEditor list ofQLabels on it. Outside world can update it, or betteremita signal for which that has a slot. Howeverm code does depend if you really mean "real-time" messages/updates. -
@john_hobbyist
Create a modelessQDialog, put aQTextEditor list ofQLabels on it. Outside world can update it, or betteremita signal for which that has a slot. Howeverm code does depend if you really mean "real-time" messages/updates.@JonB So, I let the QDialog window open at the same time as the other main window works? Will that concept work? I mean to have in parallel 2 windows do jobs? Do I need thread level programming?
-
@JonB So, I let the QDialog window open at the same time as the other main window works? Will that concept work? I mean to have in parallel 2 windows do jobs? Do I need thread level programming?
@john_hobbyist
Yes; yes; yes; no. :) -
This post is deleted!
-
So I managed to connect a QDialog when a button is pressed. I initialized a global string. I need when a function is called to send data to the global string and I need the QDialog to update its text by reading the global string and print it. How can I achieve that?
-
So I managed to connect a QDialog when a button is pressed. I initialized a global string. I need when a function is called to send data to the global string and I need the QDialog to update its text by reading the global string and print it. How can I achieve that?
@john_hobbyist
No global variables. You know that Qt is all about signals & slots. That is how best to communicate between separate windows. -
@john_hobbyist
No global variables. You know that Qt is all about signals & slots. That is how best to communicate between separate windows.@JonB So, when each function takes place it should emit signal to the function related to QDialog? I am trying to understand the rationale here...
-
@JonB So, when each function takes place it should emit signal to the function related to QDialog? I am trying to understand the rationale here...
@john_hobbyist said in Real-time information window auxiliary to the main app:
when each function takes place it should emit signal to the function related to QDialog?
Yes.
Or, if you use open() instead of exec(), you could also implement setter functions in your dialog which can be easily called from other places to pass some data to the dialog.