Skip to content
Advertisement

Returning value from ListWidget Selection in another class – PyQt5

I’m working on a script where when a user clicks on a button, a pop-up window will appear that contains a list. When the user doubleclicks on an item from that list, a label will populate on the original window with the selection. I’ve got most of the code working, but I’m having trouble on returning the selected value from the list back to the original window. Here is the code I’ve made so far:

”’

JavaScript

”’

Any suggestions on where I am going wrong or what the last lines of code I need are? Let me know if you need additional information in order to help me out

Advertisement

Answer

Create a signal on your Tag_PopUp that emits when the user clicks the item in the list, and connect it to your Main Widget to update the label. I made notes in the code below where I made changes.

For Example:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement