[Qgis-user] force data type in QTableWidget in QGIS plugin

matteo matteo.ghetta at gmail.com
Wed Mar 2 07:46:04 PST 2016


> I assume that it's just saved as a string when you fill it in designer?

exactly.. I filled the table cells with numbers that are "translated" in
strings by Qt.

> So in this case you will need to check the value itself (with tricks
> like casting to an integer and if unsuccessful casting to a float or
> similar).

ah ok.. I hoped for something easier :)

so there is no way (in Designer) to prevent the column for different
values? I mean, I want that in the first column you can add just Int and
not floats.

Thanks again Matthias

Cheers

Matteo



More information about the Qgis-user mailing list