1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
   |  
 
void        CL::selectionPeriode(QModelIndex sel)
{  
        if (cd1 && cd2 && cd3 && this->_modelDate->item(sel.row(), idM)->background() == QBrush(QBrush(QColor(18, 195, 76)) )) 
        {
           // si je suis ici, les modifications n apparaissent que apres avoir dessendu le scroll ou alors en cliquant sur une comboBox appartenant a la frame qui n est pas du tout connecte.
           this->_modelDate->item(sel.row(), idJC)->setBackground(QBrush(QColor(18, 195, 76))); 
           this->_modelDate->item(sel.row(), idM)->setBackground(QBrush(QColor(216, 78, 78))); 
        }
        else
          // si je suis la la modification apparait en instantanee
            this->_modelDate->item(sel.row(), sel.column())->setBackground(QBrush(QColor(18, 195, 76)));
    }
    else
      // pareil
        this->_modelDate->item(sel.row(), sel.column())->setBackground(QBrush(QColor(216, 78, 78)));
 
    // DESELECTIONNE
    QItemSelectionModel *selection = ui._2tableDate->selectionModel();
    selection->select( sel, QItemSelectionModel::Toggle );
} | 
Partager