Results 1 to 4 of 4

Thread: [NewBe] A Contact List with QTreeView or Widget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: [NewBe] A Contact List with QTreeView or Widget

    You probably won't have to touch QTreeView:aintEvent() unless you need to change how the tree visuals are painted.
    You will need delegates to change how the cells/rows are rendered.

    QTreeView is very likely the right approach when displaying a unknown amount of data in a tree like structure but you could also have a look at QColumnView which displays tree like data in a "drill-down" kind of fashion.

    My suggestion would be to start with learning how to handle the QPainter API but by using simple QWidget painting first.
    I.e. create a custom widget and implement paintEvent()

    Once you have reach a state where you are satisfied with the visualization, you can easily take that into delegates and are then free to concentrate on the delegate and model/view specific things.

    Cheers,
    _

  2. The following 2 users say thank you to anda_skoa for this useful post:

    ChrisW67 (2nd November 2013), comuun (2nd November 2013)

  3. #2
    Join Date
    Oct 2013
    Posts
    2
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Windows Android

    Default Re: [NewBe] A Contact List with QTreeView or Widget

    Thank you for taking the time to read my long question
    and thank you even more for giving such a wonderful answer!

    Like you said I will concentrate on the QPainter API first
    and move on to Delegates afterwards.

    I finally how to approach the problem.
    Thank you!!

  4. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: [NewBe] A Contact List with QTreeView or Widget

    QColumnView... How, after all this time, have I nver noticed that before? Thanks anda_skoa.

Similar Threads

  1. Replies: 0
    Last Post: 1st June 2011, 15:17
  2. How to create collapsing type contact list
    By The Storm in forum Qt Programming
    Replies: 38
    Last Post: 10th October 2009, 13:34
  3. Newbe questions
    By Doug Broadwell in forum Newbie
    Replies: 2
    Last Post: 18th January 2009, 12:42
  4. newbe question about signals / slots
    By Walsi in forum Qt Programming
    Replies: 19
    Last Post: 20th April 2007, 10:54
  5. 4.1.1 to 4.2 upgrade, newbe question.
    By Doug Broadwell in forum Installation and Deployment
    Replies: 2
    Last Post: 10th October 2006, 19:30

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.