doubles and strings as items of a QTableWidget
Hi,
I want to create a simple QTableWidget consisted of strings and double numbers.
I want the user to edit these items and I want the program to access/edit the values of these items.
In the documentation, I found so far,
a QTableWidget is consisted of QTableWidgetItems
A QTableWidgetItem is contructed from this function
which is the int type for double numbers and QStrings? I cannot find any list
Re: doubles and strings as items of a QTableWidget
Also it has an overloaded constructor with a QString argument: QTableWidgetItem
Basically what you will do is subclass QTableWidgetItem, and store everything as a QString and then see if it's a double/int value or just a string, or a string that means something (like a formula)
You can download from here the sample code for C++ GUI Programming with Qt4, 2nd Edition, it has an example with that functionality.