Example:
first_dropdown = 'Colored Pencil'
colors = "Black", "Blue", "Brown", "Green", "Grey", "Yellow", "White"
self.example = QComboBox()
self.example.addItem(first_dropdown, [colors])
TypeError: index 0 has type 'tuple' but 'str' is expected
The program executes without errors if instead of using the variable 'colors', I simply list the entire tuple ("Black", "Blue", etc.)
When you do this:
[colors]
you would get this:
[('Black', 'Blue', 'Brown', 'Green', 'Grey', 'Yellow', 'White')]
the function needs a tuple made of strings not a list of a tuple of strings. you can do a simple fix by writing:
tuple(colors)