Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QTcpSocket cause the GUI freeze #1262

Closed
xiaoyifang opened this issue Oct 28, 2023 · 1 comment · Fixed by #1270 or #1338
Closed

QTcpSocket cause the GUI freeze #1262

xiaoyifang opened this issue Oct 28, 2023 · 1 comment · Fixed by #1270 or #1338

Comments

@xiaoyifang
Copy link
Owner

xiaoyifang commented Oct 28, 2023

It must be dict.org. I use wikipedia behind the proxy and it doesn't block my input.

if ( !socket.waitForConnected( 100 ) )

seems caused by this line.
The weird place is that this function is invoked from the qtconcurrent already?How can it still freeze the GUI?
I reduce the time only to reduce the freeze time, but the function also been affected too. 100 ms is not enough to set up a connection.

maybe rewrite the whole logic in asyncronous(nonblock) signal .

Originally posted by @xiaoyifang in #1244 (comment)

@xiaoyifang
Copy link
Owner Author

xiaoyifang commented Oct 28, 2023

QTcpSocket seems have some relation with this.

I have tried both the signal slot method #1246,

and use a seperate thread staged...opt/wiki-word-suggestion-list-2 to implement the logic .

Both methods failed and still freeze the gui for a few seconds.

maybe drop QTcpSocket and use a different network library?

@xiaoyifang xiaoyifang changed the title dict.org cause the GUI freeze QTcpSocket cause the GUI freeze Oct 28, 2023
@xiaoyifang xiaoyifang reopened this Nov 7, 2023
@xiaoyifang xiaoyifang linked a pull request Dec 13, 2023 that will close this issue
@xiaoyifang xiaoyifang linked a pull request Dec 26, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant