Results 1 to 1 of 1

Thread: Search For Header name in QTableview, QsqlQueryModel

  1. #1
    Join Date
    Nov 2010
    Posts
    100
    Thanks
    38
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Search For Header name in QTableview, QsqlQueryModel

    Hello ,

    I have a QTableView in which i have displayed many columns with data. I wanted to keep a search function so that i can scroll to the searched column name. I wanted to use only the Header Names as the search query. so i have given a line edit with only the names of the tableview Headers. I am using QSqlQueryModel to display the data in the table view..

    Qt Code:
    1. QSqlQueryModel *model1 = new QSqlQueryModel(tableView);
    2. model1->setQuery("SELECT * FROM allhexdata");
    3. tableView_2->setModel(model1);
    To copy to clipboard, switch view to plain text mode 
    how should i do that.
    Last edited by nagabathula; 25th April 2011 at 09:44.

Similar Threads

  1. QStandardItem's header item and header label
    By feverzsj in forum Newbie
    Replies: 1
    Last Post: 14th January 2010, 19:57
  2. Is there a web search pattern?
    By thewooferbbk in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 16:02
  3. file search
    By Benjamin in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2009, 14:33
  4. How to customize horizontal header (diagonal header view)
    By vairamuthu.g in forum Qt Programming
    Replies: 4
    Last Post: 4th September 2008, 15:59
  5. Search box?
    By sdfisher in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2007, 18:37

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.