Results 1 to 4 of 4

Thread: Save a QTreeView... Options?

  1. #1
    Join Date
    Aug 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Save a QTreeView... Options?

    Im creating a Project with a QTreeView and i later want to save my created TreeView. Which Options i have? Maybe Serialization, but i dont know which Datatype i need for this way. A Database will be an other Option, but i dont know how to realize that. Anynone has some good Tipps?

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

    Default Re: Save a QTreeView... Options?

    I would recommend a format that is designed for hierachical data, e.g. JSON or XML.

    Cheers,
    _

  3. #3
    Join Date
    Aug 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Save a QTreeView... Options?

    I was thinking about Databases. Is there any Tutorial where somebody explains how i do that with Databases? I read somewhere that it is possible to bind the Tree to a SQL Model, but i dont find something about it in the Internet.

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

    Default Re: Save a QTreeView... Options?

    Well, a database is inherently table oriented, so storing a tree will need some form of parent/child relation information and code that uses that to build a tree from the "flat" database data.

    Cheers,
    _

Similar Threads

  1. QVariant : save : unable to save type 128
    By capbee in forum Qt Programming
    Replies: 0
    Last Post: 15th July 2013, 09:10
  2. Replies: 4
    Last Post: 29th May 2012, 23:37
  3. Advanced PKG Options [S60]
    By ManuMies in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 30th November 2009, 11:52
  4. QTextEdit and some options
    By troorl_ua in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2007, 22:03
  5. Zoom Options
    By Kapil in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2006, 11:19

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.