Results 1 to 5 of 5

Thread: Mapping.. ComboCheckBox using QDataWidgetMapper to SQLite

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2016
    Posts
    5
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Mapping.. ComboCheckBox using QDataWidgetMapper to SQLite

    Thank you, wysota.

    But why do the following delegate doesn't work just for changing index:
    Qt Code:
    1. mapper = new QDataWidgetMapper(this);
    2. mapper->setModel(model);
    3. mapper->setItemDelegate(new QSqlRelationalDelegate(this));
    4. mapper->addMapping(comboCheckBox, model->fieldIndex("inj1"), "currentIndex");
    To copy to clipboard, switch view to plain text mode 
    What is the use of manual delegate?
    My editor (a la combo check box has the model already). To which another model I should delegate it?

    Quote Originally Posted by anda_skoa View Post
    What is a combo check box?
    It is a combo box with checkable items expect the title (first item).

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Mapping.. ComboCheckBox using QDataWidgetMapper to SQLite

    Quote Originally Posted by stanislavf View Post
    It is a combo box with checkable items expect the title (first item).
    Since that appears to be a custom class, does it have a writable "currentIndex" property?

    Cheers,
    _

Similar Threads

  1. Replies: 7
    Last Post: 19th October 2016, 19:48
  2. Replies: 8
    Last Post: 9th March 2014, 13:55
  3. tile mapping in qt?
    By even821 in forum Qt Programming
    Replies: 5
    Last Post: 16th November 2012, 14:14
  4. QSortFilterProxyModel mapping
    By Sparhawk in forum Qt Programming
    Replies: 1
    Last Post: 17th December 2011, 20:00
  5. Mapping between two comboboxes
    By codeman in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2009, 17:32

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.