Results 1 to 4 of 4

Thread: Qcombobox isModified method

  1. #1
    Join Date
    Jan 2009
    Posts
    45
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Qcombobox isModified method

    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..

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qcombobox isModified method

    Perhaps you could let QDataWidgetMapper handle that for you?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2009
    Posts
    45
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qcombobox isModified method

    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?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qcombobox isModified method

    Type in QDataWidgetMapper in Qt Assistant. Also take a look at the "simple widget mapper" example.

Similar Threads

  1. QComboBox drop list button events
    By maird in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 19:25
  2. Replies: 4
    Last Post: 10th March 2007, 18:01

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.