PDA

View Full Version : Qcombobox isModified method



tgreaves
7th January 2009, 19:10
Qlineedit has a method called isModified which returns a bool saying that if the text has been changed or not..

I dont see where Qcombobox has an isModified method for when the index is changed.. Is there something that will allow me to find out if the Qcombobox has changed without having to catch the currentIndexChanged signal?

What im trying to do is have a bunch of Qcombobox's on the screen with prefilled data and I want to know in the end which Qcombobox's were changed so I can update a database.. I know I can just update the database using itemText from each Qcombobox weather it was changed or not but I wanted to avoid that if I can..

jpn
7th January 2009, 20:07
Perhaps you could let QDataWidgetMapper handle that for you?

tgreaves
7th January 2009, 20:19
Ill have to read up on that class some more.. I was just going to create a new "enhanced" qcombobox class that includes the isModified member and add it to designer but im thinking maybe the QDataWidgetMapper is a better solution to my problem..

Does anyone have an examples of QDataWidgetMapper being using like I need it to?

wysota
7th January 2009, 23:12
Type in QDataWidgetMapper in Qt Assistant. Also take a look at the "simple widget mapper" example.