Results 1 to 2 of 2

Thread: Formatting tablemodel data exhibition on a tableview.

  1. #1
    Join Date
    Feb 2010
    Location
    Brazil
    Posts
    23
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Formatting tablemodel data exhibition on a tableview.

    Hello,

    I'm displaying a table from a database using QSqlTableModel and QTableView. The problem is that the format I'm using to store data in the database isn't what I want to be displayed to the user. Is there a way to format the data while still using a QSqlTableModel? I'm using Qt 5.

    Thanks.
    Last edited by tiredtyrant; 3rd February 2013 at 19:22. Reason: updated contents

  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: Formatting tablemodel data exhibition on a tableview.

    Yes, use QAbstractProxyModel
    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. How to store data in a tablemodel
    By rubikon in forum Newbie
    Replies: 11
    Last Post: 13th August 2012, 15:18
  2. Replies: 1
    Last Post: 29th September 2011, 20:20
  3. Managing data in a TableView
    By scarleton in forum Qt Programming
    Replies: 6
    Last Post: 11th June 2010, 01:48
  4. Data from TableModel and into Text Edit
    By Nefastious in forum Newbie
    Replies: 1
    Last Post: 16th September 2009, 03:36
  5. getting data from tableView
    By mkarakaplan in forum Newbie
    Replies: 1
    Last Post: 7th November 2007, 10:51

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.