Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. error: 'QComboBox::insertItem' : no overloaded function takes 1 arguments
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 510 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • andrei84A Offline
    andrei84A Offline
    andrei84
    wrote on last edited by
    #1

    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
    				}
    			}
    		}
    	}
    }
    

    }

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2
      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())
      
      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved