Recently, I am making a simple socket chat program with pyqt5.
In this process, I would like to make a color pallet that can determine the color of the font using the combo box
I want to know how to put the color in the combo box item.
Second, the socket multi-chat program implemented server recv as thread, which is provided by default
Problem occurs with the directly implemented exit button rather than the X mark in the window window.
The end button was implemented using app.quit(), sys.exit(1), etc.
When you click the button, the program stops.
I think it's because the thread is working on the expected phenomenon.
I want to know how to end the thread.
Please answer me. Thank you.
pyqt5 python combobox color thread
Of course, you have to gracefully end it.
I'm sure the recv is waiting around the infinite loop.
In the part of listening to the data, configure the code so that you can escape at any signal, not just an infinite loop, and sock after escape.Shutdown(socket.SHUT_RDWR) and close() should be called.
https://docs.python.org/ko/3/howto/sockets.html#disconnecting
Refer to the link above
And this was bookmarked a long time ago
Read this article, too.
© 2024 OneMinuteCode. All rights reserved.