Results 1 to 3 of 3

Thread: QTreeview projects view

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default QTreeview projects view

    Hey there,

    I'm using a QTreeview + QDirModel.

    I want to achieve the following :
    - A list of projects.
    - Inside each project I want a QDirModel view of its directory content.

    Basically I want to recode a project's file treeview like any IDE like Qt Creator or Visual studio.

    What's the simplest way ?

    Thanks.

  2. #2
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: QTreeview projects view

    Guess I'll have to reimplement my own QAbstractListModel.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTreeview projects view

    QAbstractListModel will give you a flat model and you probably want a hierarchical one so QAbstractItemModel is the way to go. Just think first if you can make use of QStandardItemModel instead of implementing your own model, I think it will suit you fine.

Similar Threads

  1. Graphics View Panning ,zooming
    By linuxdev in forum Qt Programming
    Replies: 3
    Last Post: 29th December 2008, 07:17
  2. World View Zooming factor
    By Pharell in forum General Programming
    Replies: 0
    Last Post: 6th November 2008, 13:04
  3. Drag and drop in QTreeView
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 27th July 2008, 09:36
  4. QTreeView questions about view doubles and more
    By davisjamesf in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2007, 00:39
  5. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 08:50

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.