Results 1 to 5 of 5

Thread: object hierarchy

  1. #1
    Join Date
    May 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default object hierarchy

    Hello,
    I need to display object hierarchy (3 level deep) on the different part of screen. For example on the first part (maybe qListWidged) i click on the car item. On the second part i get list of brands of cars (Vw, Audi, Bmw ..). Then a can click on the brand and on the third part on the screen i get list of car types given brand.

    My question is, how model this data and than display it in simplest way? Hierarchy of list of object? Or the is some template for this in Qt? Maybe use QStandartItem class?

    Thank

  2. #2
    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: object hierarchy

    Create a tree model and three views (lists or tables) and then show different levels of your model in each of the views.
    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.


  3. #3
    Join Date
    May 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: object hierarchy

    I wanted to avoid tree model and view, it seems to me to be too complicated for such thing, isn't something more simpler..?

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: object hierarchy

    Actually, it's not that difficult.

    See the simple tree model example:
    http://doc.qt.nokia.com/4.6/itemview...treemodel.html

  5. #5
    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: object hierarchy

    You can do everything manually if you want, if that's simpler to you.
    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.


Similar Threads

  1. QT Class Hierarchy Diagram
    By graciano in forum General Discussion
    Replies: 1
    Last Post: 13th May 2009, 13:20
  2. Need advice regarding hierarchy view
    By high_flyer in forum Qt Programming
    Replies: 4
    Last Post: 9th July 2008, 09:42
  3. Problem with my object hierarchy
    By rage in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2007, 09:18
  4. QListView and changing the hierarchy
    By sgroarke in forum Newbie
    Replies: 3
    Last Post: 13th June 2007, 07:51
  5. creating a tree hierarchy using QStandardModel
    By wind in forum Qt Programming
    Replies: 3
    Last Post: 19th September 2006, 21:54

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.