Bonjour,
En fait, je désire changer la sélection de QTableWidget lorsque le nombre de ses lignes est nul. Par exemple je désire que mon HeadersLabel soit sélectionné, afin d'envoyer un signal itemSelectionChanged().
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 void ProxyHTTPView::DeleteProfil() { int rowNumberP; rowNumberP = uiProxyHTTPView.tableWidget_Profiles->rowCount(); if (rowNumberP > 0) { uiProxyHTTPView.tableWidget_Profiles->removeRow( uiProxyHTTPView.tableWidget_Profiles->currentRow()); uiProxyHTTPView.tableWidget_Profiles->resizeColumnsToContents(); rowNumberP--; } else if (rowNumberP == 0) { uiProxyHTTPView.tableWidget_Profiles->setRowCount(rowNumberP); } uiProxyHTTPView.tableWidget_Profiles->selectRow(rowNumberP); }
Quelqu'un pourra m'aider?
Merci
Partager