Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to check if the contents of QComboBox are empty or not?



  • I am a beginner in Qt and probably this is a very easy task but i wanted to know how to find if a QCombobox is empty or not?
    I tried to do something like this
    if(ui.ComboBox->currentIndex(-1))
    But this is not working for me and gives me an error that "too many arguments in function call"



  • if (ui.ComboBox->count() == 0)


Log in to reply