Skip to content
Advertisement

PyQt: How to connect QComboBox to function with Arguments

QComboBox is connected to a function using following syntax:

JavaScript

But I need to be able to send the arguments from ComboBox to myFunction(). But if I use:

JavaScript

I am getting

JavaScript

What syntax needs to be used to connect a QComboBox to a function that is able to receive arguments sent from Comobobox?

EDITED LATER:

Here is the code resulting an TypeError:

connect() slot argument should be a callable or a signal, not 'NoneType'


JavaScript

Advertisement

Answer

After I posted a question Stachoverflow suggested a link which explained a lot. Here is the answer:

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