Results 1 to 2 of 2

Thread: QdataWidgetmapper + Qcalenderwidget

  1. #1
    Join Date
    Apr 2013
    Posts
    27
    Thanks
    9
    Qt products
    Qt5
    Platforms
    Windows

    Default QdataWidgetmapper + Qcalenderwidget

    Hello,

    Im using a Qdatawidgetmapper to map a datum field from my sql server database to a Qcalanderwidget. i use onfieldchange and autosubmit.

    when load the form or change to an other row it works. the date changes.
    But when i change the valuwe it is not committed the database.

    i tryed:

    connect(ui->QCalenderWidgetAfleverdatum, SIGNAL(selectionChanged()),mapper,SLOT(submit()));
    but the it is submitting NULL to the database

    Mapper->addMapping(ui->QCalenderWidgetAfleverdatum ,orderGegevens->record().indexOf("leverdatum"), "selectedDate");
    i'm getting : QODBCResult::exec: unable to bind variable: "[Microsoft][ODBC SQL Server Driver]De optionele voorziening is niet geïmplementeerd"

    How can i connect Qdatawidgetmapper to a calenderwiged and make ik work?

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QdataWidgetmapper + Qcalenderwidget

    connect(ui->QCalenderWidgetAfleverdatum, SIGNAL(selectionChanged()),mapper,SLOT(submit()));
    but the it is submitting NULL to the database

    Mapper->addMapping(ui->QCalenderWidgetAfleverdatum ,orderGegevens->record().indexOf("leverdatum"), "selectedDate");
    i'm getting : QODBCResult::exec: unable to bind variable: "[Microsoft][ODBC SQL Server Driver]De optionele voorziening is niet geïmplementeerd"
    I don't think it is a problem with QCalendarWidget/QDataWidgetMapper, it may be somthing to do with ODBC driver, check if removing the QCalendarWidget is submitting the other data properly.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. QRadioButton and QDataWidgetMapper
    By SimonSchmeisser in forum Qt Programming
    Replies: 3
    Last Post: 24th June 2015, 15:28
  2. QDataWidgetmapper
    By locus in forum Qt Programming
    Replies: 7
    Last Post: 5th June 2012, 11:24
  3. QCalenderWidget mark dates RED
    By ad3d in forum Qt Programming
    Replies: 1
    Last Post: 11th April 2011, 10:59
  4. QCalenderWidget doesn't show the month name and Day name.
    By jthacker in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2010, 20:43
  5. QDataWidgetMapper
    By rogerholmes in forum Newbie
    Replies: 4
    Last Post: 24th March 2009, 19: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.