I have a tab in the client that listens for data from a socket.
When I close the client I cant get the Tab to shut down the socket.
I have tried a number of ways to trigger a function on close but failing.
Here is the closest example on stack overflow I can find.
https://stackoverflow.com/questions/403 ... qtabwidget
I was hoping somoene with intimate knowledge of the front end of the client can help me.
Cheers
Joe
PyQt question: Connect the X button to a function in a Tab
-
- Member
- Posts: 83
- Joined: Mon Jun 18, 2018 2:37 am
-
- Bitcraze
- Posts: 630
- Joined: Tue Jun 30, 2015 7:47 am
Re: PyQt question: Connect the X button to a function in a Tab
Qt is not my strongest topic but you could try to do something from
https://github.com/bitcraze/crazyflie-c ... #L577-L580
This function is called when the client is closed.
The suggested solution in StackOverflow looks like a better solution since everything will be encapsulated in your tab class. (I could not get it to work when I did a quick test though, but I might have messed something up)
https://github.com/bitcraze/crazyflie-c ... #L577-L580
This function is called when the client is closed.
The suggested solution in StackOverflow looks like a better solution since everything will be encapsulated in your tab class. (I could not get it to work when I did a quick test though, but I might have messed something up)
-
- Member
- Posts: 83
- Joined: Mon Jun 18, 2018 2:37 am
Re: PyQt question: Connect the X button to a function in a Tab
Thanks! this was a good start. We made a work around from here.