error: 'QComboBox::insertItem' : no overloaded function takes 1 arguments



  • void Aut_ConfigInSub::onVarRef_InjUnits(int injUnits)
    {
    int pageCount = this->ui().tabWidget_digInputs->count();
    int configInp = this->MaxNumDigIn;
    char buf[64], inj[5];
    QWidget * item;
    QComboBox * _ccbox;
    int i, j;

    this->InjUnits = injUnits;
    
    if(this->InjUnits <= 1)
    {
    	for(i=0;i<pageCount;++i)
    	{
    		if(this->c_injheader[i]) this->c_injheader[i]->hide();
    	}
    
    	for(i=0;i<configInp;++i)
    	{
    		if(this->c_injunits[i]) this->c_injunits[i]->hide();
    	}
    }
    else
    {
    	for(j=0;j<configInp;++j)
    	{
    		if(this->c_injunits[j])
    		{
    			if(this->c_injunits[j]->count() < this->InjUnits)
    			{
    				for(i=1;i<=this->InjUnits;++i)
    				{
    					sprintf(inj, "%i", i);
    					this->c_injunits[j]->insertItem(inj);  //here is an error
    				}
    			}
    		}
    	}
    }
    

    }


  • Moderators

    void QComboBox::insertItem(int index, const QString &text, const QVariant &userData = QVariant())
    
    void QComboBox::insertItem(int index, const QIcon &icon, const QString &text, const QVariant &userData = QVariant())
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.