Results 1 to 7 of 7

Thread: how to display QSqlQueryModel in QTreeView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: how to display QSqlQueryModel in QTreeView

    No. Based on a given source model index you have to be able to calculate the hierarchy (parent) and position (row, column) in the destination model.

    If this all sounds too complicated for you, you can forget about query and proxy models and based on QSqlQuery and QStandardItemModel build a new model and copy the data to it from the query.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    mandal (2nd September 2009)

  3. #2
    Join Date
    Nov 2006
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3

    Default Re: how to display QSqlQueryModel in QTreeView

    i will try subcllassing proxymode firstl..
    Thanks for your help..

Similar Threads

  1. Process the display data before displaying in QTreeView
    By babu198649 in forum Qt Programming
    Replies: 5
    Last Post: 23rd June 2009, 05:21
  2. QSqlQueryModel -> QTreeView
    By smrtak in forum Qt Programming
    Replies: 3
    Last Post: 24th August 2008, 18:12
  3. Display only PNG image on desktop
    By durbrak in forum Qt Programming
    Replies: 32
    Last Post: 15th March 2008, 21:55
  4. QTreeView help
    By bepaald in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 21:22
  5. Can't change the text display of a QTreeview item.
    By johnny_sparx in forum Qt Programming
    Replies: 3
    Last Post: 2nd June 2006, 01:03

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.