Nov-01-2019, 11:28 PM
(Nov-01-2019, 10:16 PM)Denni Wrote: You are using the QThread concept for this I will try and look at this later to outline a better cleaner approach to what you are trying to do -- but if you are sub-classing a QThread you are either using the wrong kind of QThread or the wrong usage of QThread
Thanks for effort. What I am trying to achieve it to open and keep port forwarding connection via SSH and on the top of that port forwarding establish a connection to SQL Server. If I run either port forwarding connection or SQL server conection on its own (one or another) everything works OK (when running SQL Server connection alone I am using PuTTY to establish SSH tunnel and forward ports). Therefore my impression is that port forwarding and SQL Server connection somehow intefere one with another. I do not know however how to fix it.
Regarding the QThread. It is quite likely the way I am using QThread is wrong but I am not aware of anything else that could run multiple concurrent processes within QT GUI without freezeing the app. Running port forwarding without QThread freezes the app, the same with SQL Server connection provided the query takes more than 1 - 2 seconds (in that case the freeze is not noticable).