Unsolved QWidgetDataMapper and data types for SQLite3 database
I'm using QDataWidgetMapper to map some various widgets to my TableModel. I have QLineEdit's, some radio buttons, and some time spinboxes.
I tried finding in the documentation, but couldn't...what data type should I provision in my SQLite3 database for these types of items? Obviously TEXT for QLineEdit, but should I just use BLOBs for everything else?
Or better yet, how would I find out the datatype for each widget.
Bonus question, is there an easy way to map the QDataWidgetMapper with a radio button group? Instead of a separate column for each radio in the database.
Thanks for your time, Jude.
JonB last edited by JonB
You don't provision the database for what types of widgets
QDataWidgetMapperdisplays, it is the other way round. It picks a text edit for a string, a number edit for a number, and so on, depending on your data types. So I don't know what your question is asking, or what you would want to store a BLOB in the database for.
From the look of your widgets:
To find which type for which widget, look at the user property of the widget. Otherwise you can configure which property the mapper shall use with the widget assigned.
QDataWidgetMapper maps one column with one widget so a button group would not make sense.