Results 1 to 2 of 2

Thread: How can i set a default value for a QSqlRelationalDelegate

  1. #1
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default How can i set a default value for a QSqlRelationalDelegate

    Hi,

    I am experimenting a piece of code based on this example: http://doc.trolltech.com/4.3/qsqlrel...l.html#details
    When i try to insert a new record and "forget" to select the "City" the insert fails because i have the FK CONSTRAINT.

    Is there an easy way, without creating my own delegate, for selecting a default value from the referenced table?

    Thanks

  2. #2
    Join Date
    Sep 2008
    Location
    Portugal
    Posts
    171
    Thanks
    57
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How can i set a default value for a QSqlRelationalDelegate

    Tonight i learned a new English word ... PRIME

Similar Threads

  1. syntax error : identifier 'QSqlRelationalDelegate'
    By sticcino in forum Qt Programming
    Replies: 6
    Last Post: 16th September 2011, 11:15
  2. refreshing QSqlRelationalDelegate data
    By darksaga in forum Qt Programming
    Replies: 1
    Last Post: 9th November 2010, 01:54
  3. QSqlRelationalDelegate (ComboBox) id on first show
    By janus in forum Qt Programming
    Replies: 1
    Last Post: 5th September 2008, 14:58
  4. Replies: 3
    Last Post: 8th March 2007, 15:54
  5. Error in qsqlrelationaldelegate.h?
    By brcain in forum Qt Programming
    Replies: 3
    Last Post: 28th August 2006, 13:05

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.