Results 1 to 5 of 5

Thread: from sqlquery to qstringlist

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Oct 2015
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Android

    Default Re: from sqlquery to qstringlist

    Qt Code:
    1. QSqlQuery *query = new QSqlQuery("select "+filed_name+" from "+table_name);
    2. while(query->next())
    3. {
    4. combobox.addItem(query->value(0).toString());
    5. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by tokimay; 4th February 2016 at 17:55.

Similar Threads

  1. Help QStringList
    By pcoliver in forum Qt Programming
    Replies: 0
    Last Post: 15th September 2011, 11:15
  2. sqlQuery executing return nothing
    By ar_a24 in forum Qt Programming
    Replies: 0
    Last Post: 26th February 2011, 07:04
  3. SQLQUERY - column value retrun problem
    By damodharan in forum Qt Programming
    Replies: 7
    Last Post: 27th May 2010, 08:09
  4. Casting in a select sqlQuery
    By Kesy in forum Qt Programming
    Replies: 3
    Last Post: 25th November 2008, 16:12
  5. Replies: 7
    Last Post: 2nd June 2006, 13:48

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.