title: selecting multiple checkboxes in qt
body: <p>I have a problem performing multiple check operations. Basically what i do is I will click on mark several action to call markSeveral() and then from there i call clicked() signal of list to call setcheckBoxes() and then set the checkboxes. now the provlem is dis happens perfectly qt first time, but when i do it for second time the setcheckboxes() slot is called twice hence d checkboxes are not set. Again for third attempt the setcheckboxes() slot is called thrice but d checkboxes do get set.</p>
  
  <p>Why is the slot called so many times when i make a call to it only once?</p>
  
  <p>please tell me what I am doin wrong</p>
  
  <p>Thanks in advance. here is the piece of my code:</p>
  
  <pre><code>void Browser::markSeveral()
  {
      itemClicked=true;
      multiSelect=true;
      MarkClicked=true;
      MarkMenuClicked=true;
  
      connect(list,SIGNAL(clicked(QModelIndex)),this,SLOT(setCheckBoxes(QModelIndex)));
  }
  
  void Browser::setCheckBoxes(QModelIndex index)
  {
  
      if(MarkClicked ==true &amp;&amp; model-&gt;data(index,Qt::CheckStateRole) == Qt::Unchecked)
      {        
          model-&gt;setData(index,Qt::Checked,Qt::CheckStateRole);
          indexList.append(index);
      }
      else
      {
          if(MarkClicked ==true &amp;&amp; model-&gt;data(index,Qt::CheckStateRole) == Qt::Checked)
          {
              model-&gt;setData(index,Qt::Unchecked,Qt::CheckStateRole);
              indexList.removeOne(index);
          }
      }
  
  
  }
  </code></pre>