hey i was wondering if theres a way to write protect cells in a table if you dont want a user to write data into they particular cells - with a QTableWidget???
hey i was wondering if theres a way to write protect cells in a table if you dont want a user to write data into they particular cells - with a QTableWidget???
I am not sure if you can do it through QTableWidget, but QTableWidgetItem has setFlags method:
Bojanvoid QTableWidgetItem::setFlags ( Qt::ItemFlags flags )
Sets the flags for the item to the given flags. These determine whether the item can be selected or modified.
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);
hey i tried the flags method and it worked - thanks man for the help. cya
Bookmarks