Unwanted Windows Command Prompt when using QSignalSpy::wait()
-
I'm using a QSignalSpy::wait() to wait for a specific reply during TCP communication. But by including testlib, the app always opens a command prompt on Windows. Is there any way to suppress that (I'm using qmake and coding on Debian btw)? Or can you suggest a workaround?
Currently, I'm emitting a custom signal upon receiving the reply I expect, which is connected to a QSignalSpy.
-
I'm using a QSignalSpy::wait() to wait for a specific reply during TCP communication. But by including testlib, the app always opens a command prompt on Windows. Is there any way to suppress that (I'm using qmake and coding on Debian btw)? Or can you suggest a workaround?
Currently, I'm emitting a custom signal upon receiving the reply I expect, which is connected to a QSignalSpy.
@JKappes said in Unwanted Windows Command Prompt when using QSignalSpy::wait():
I'm using a QSignalSpy::wait() to wait for a specific reply during TCP communication
Why? QSignalSpy is meant to be used in tests. If you really have to wait (do you really have to?) then you should use a local event loop instead.
-
@JKappes said in Unwanted Windows Command Prompt when using QSignalSpy::wait():
I'm using a QSignalSpy::wait() to wait for a specific reply during TCP communication
Why? QSignalSpy is meant to be used in tests. If you really have to wait (do you really have to?) then you should use a local event loop instead.
-
@jsulm That's just the first way I got it to work.
It's better for UX to wait, so I'll try an event loop. Thanks for the tip.@JKappes said in Unwanted Windows Command Prompt when using QSignalSpy::wait():
It's better for UX to wait
I disagree - you're blocking the UI, this can be frustrating for the user. But its you application.