Results 1 to 16 of 16

Thread: Populate QTreeView from database

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Populate QTreeView from database

    Oh, I definitely agree that there can be value in a proxy approach.
    I am just saying that it usually is more complex than making the actual model already do the right thing.

    Cheers,
    _

  2. #2
    Join Date
    Dec 2007
    Location
    London
    Posts
    206
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android
    Thanks
    40

    Default Re: Populate QTreeView from database

    Hi guys, thank you all for your help . I simply implemented a standardItemModel and everything is ok now. I think proxymodel is a bir complex for my level.

    Cheers :-)

  3. #3
    Join Date
    Feb 2015
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Populate QTreeView from database

    Hello!!!I have exactly the same problem like you had.May I ask you,how exactly did you load the database into the QTreeView??I have already done the tree view without any data and I have already done the database but I don't know how to load it into my gui and how to work with this data!I guess I should use QTreeView, QSqlQuery and QAbstractItemModel like you said but I honestly have no idea how to implement this.I would really appreciate any kind of help!
    Last edited by spokV; 26th March 2015 at 02:19.

Similar Threads

  1. Qtreeview from database(sqlite)
    By cengiz3519 in forum Qt Programming
    Replies: 1
    Last Post: 4th June 2014, 23:42
  2. QTreeView & Sql Database.
    By gcain in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2013, 05:56
  3. Replies: 6
    Last Post: 20th February 2012, 10:59
  4. QTreeView and database
    By langziyang in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2010, 08:19
  5. using QTreeView with a Database model
    By darksaga in forum Qt Programming
    Replies: 1
    Last Post: 17th January 2007, 23:29

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
  •  
Qt is a trademark of The Qt Company.