Launching Gnome Terminal Stop QTimer
-
wrote on 3 Jan 2017, 20:44 last edited by
When I launch a gnome terminal from my QtGUI, the QTimer appears to be suspended until the gnome terminal is closed. Is there any way to fix that? The GUI that brings the gnome terminal up and the gnome terminal are not modal. I bring the gnome terminal up in the background. Do I need to put the gnome terminal in a sleep loop so the QTimer gets some CPU cycles?
-
When I launch a gnome terminal from my QtGUI, the QTimer appears to be suspended until the gnome terminal is closed. Is there any way to fix that? The GUI that brings the gnome terminal up and the gnome terminal are not modal. I bring the gnome terminal up in the background. Do I need to put the gnome terminal in a sleep loop so the QTimer gets some CPU cycles?
wrote on 3 Jan 2017, 20:48 last edited by@DougyDrumz Are you talking about launching the terminal with
QProcess
? If so it shouldn't have any impact on your current application for timers or blocking of threads or anything like that.Can you show some code for launching the process and the timer you are expecting to fire?
-
wrote on 3 Jan 2017, 20:57 last edited by
Yoiu know, I didn't use QProcess. Maybe that's what I should have done. Right now, a separete class (and executable) launches the gnome terminal using a system command.
-
Yoiu know, I didn't use QProcess. Maybe that's what I should have done. Right now, a separete class (and executable) launches the gnome terminal using a system command.
wrote on 3 Jan 2017, 21:04 last edited by@DougyDrumz That may be the issue.
system
may be blocking the thread which stops the timer from kicking off.Try converting to QProcess, it's super easy to use and see if you still have issues.
If you don't want to convert, you can try putting that
system
call in it's own thread and see if that fixes things for you. -
wrote on 3 Jan 2017, 22:32 last edited by
Worked like a charm! Thanks.
-
wrote on 3 Jan 2017, 22:32 last edited by
QProcess that is.
3/6