Results 1 to 1 of 1

Thread: QDataWidgetMapper doesn't respond to model changes

  1. #1
    Join Date
    May 2013
    Posts
    35
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default QDataWidgetMapper doesn't respond to model changes

    Hello,

    I've got a tricky problem that I think I've almost solved, but I've hit a wall on something that doesn't make sense... I've created a user settings framework that auto-generates views of a user settings model. The model contains a list of setting names and corresponding values. In some cases, those values are pre-determined, and I've devised a way to represent those values binarily (with radiobuttons / checkboxes) in the view. Thus, if a setting has one of three possible values, only that value will be in the source model, but all three values will be represented in the view (with only the one radiobutton / checkbox selected). Internally, I connect the views and models using QDataWidgetMappers.

    EDIT:

    If I could delete the post, I would. It occurred to me the columns in the submodel don't correspond to those in the source, and I was emitting dataChanged with incorrect column values to the mappers, so of course, they won't do anything. Quick fix. Works perfectly. Never mind. <sigh>
    Attached Images Attached Images
    Last edited by graffy; 3rd January 2014 at 11:48.

Similar Threads

  1. mouseMoveEvent doesn't respond properly
    By Ponnytail in forum Newbie
    Replies: 2
    Last Post: 4th November 2013, 20:45
  2. QDataWidgetMapper doesn't always update field in table
    By marcvanriet in forum Qt Programming
    Replies: 4
    Last Post: 14th December 2011, 12:57
  3. Replies: 6
    Last Post: 13th July 2011, 20:10
  4. Http request doesn't respond when the host is local
    By dineshkumar in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2011, 14:09
  5. QGraphicsScene doesn't respond to mousePressEvent
    By Affenbrotbaum in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2010, 20:56

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
  •  
Qt is a trademark of The Qt Company.