Results 1 to 6 of 6

Thread: Qt SQLite same name different surname lineEdit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2016
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Qt SQLite same name different surname lineEdit

    uhm? and how can I resolve that (even if partially) :'|?

  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: Qt SQLite same name different surname lineEdit

    Quote Originally Posted by Rastate View Post
    uhm? and how can I resolve that (even if partially) :'|?
    Resolve what?
    Not leaking the query -> already told you.
    Using place holders -> QSqlQuery::prepare().
    Finding the full data of the respective entry -> already suggested two options. E.g. your table has an id column. If that starts with ß, then you could use the currentIndexChanged signal that has an integer argument and use that to query.

    Cheers,
    _

  3. #3
    Join Date
    Feb 2016
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Qt SQLite same name different surname lineEdit

    I'm a real begginer, can you provide me some code line please?

  4. #4
    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: Qt SQLite same name different surname lineEdit

    Assuming the table's id starts at 0 like the combobox's index:
    Qt Code:
    1. qry.prepare("SELECT * FROM note WHERE id = :id");
    2. qry.bindValue(":id", index);
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

Similar Threads

  1. lineedit
    By madhukumar in forum Qt Programming
    Replies: 1
    Last Post: 17th February 2014, 19:17
  2. LineEdit's
    By Johnnyj2j in forum Newbie
    Replies: 6
    Last Post: 9th July 2012, 12:34
  3. Spellchecking in lineedit
    By mkas in forum Newbie
    Replies: 0
    Last Post: 27th August 2010, 11:54
  4. LineEdit.
    By Rewo in forum Newbie
    Replies: 17
    Last Post: 2nd July 2010, 09:37
  5. [Qt][SQLite] Two problems with SQLite.
    By Xandareva in forum Newbie
    Replies: 6
    Last Post: 6th April 2010, 23:06

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.