// for horizontal header
ProduitModel->setHeaderData(0,Qt::Horizontal, "Id");
ProduitModel->setHeaderData(1,Qt::Horizontal, "Designation");
ProduitModel->setHeaderData(2,Qt::Horizontal, "Famille");
ProduitModel->setHeaderData(3,Qt::Horizontal, "Qte Maximum");
ProduitModel->setHeaderData(4,Qt::Horizontal, "Qte Minimum");
ProduitModel->setHeaderData(5,Qt::Horizontal, "Prix");
ProduitModel->setHeaderData(6,Qt::Horizontal, "Prix vente");
// form vertical header
ProduitView->verticalHeader()->setStyleSheet("QHeaderView::section:checked {"
" background-color: black; }"
" background-image: url(imgs/arrow.png)"
);
// for horizontal header
ProduitModel->setHeaderData(0,Qt::Horizontal, "Id");
ProduitModel->setHeaderData(1,Qt::Horizontal, "Designation");
ProduitModel->setHeaderData(2,Qt::Horizontal, "Famille");
ProduitModel->setHeaderData(3,Qt::Horizontal, "Qte Maximum");
ProduitModel->setHeaderData(4,Qt::Horizontal, "Qte Minimum");
ProduitModel->setHeaderData(5,Qt::Horizontal, "Prix");
ProduitModel->setHeaderData(6,Qt::Horizontal, "Prix vente");
// form vertical header
ProduitView->verticalHeader()->setStyleSheet("QHeaderView::section:checked {"
" background-color: black; }"
" background-image: url(imgs/arrow.png)"
);
To copy to clipboard, switch view to plain text mode
Bookmarks