Results 1 to 2 of 2

Thread: Custom View in QML

  1. #1
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Question Custom View in QML

    Hi,
    i have a data model that contains properties for the screen position (x and y) of each element. Being quite new to qml, I think the way to go would be to write a custom 2d-View for that and bind the position for each element with a delegate.

    I'd love to have the "model:" and "delegate:" possibilities that for example a ListModel offers.

    Is there any tutorial on how to write (such a / any) custom view component?
    Or ist this the wrong approach?

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

    Default Re: Custom View in QML

    I think it is enough to use a Repeater element.
    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. The following user says thank you to wysota for this useful post:

    sedi (8th October 2014)

Similar Threads

  1. QSqlTableModel custom view
    By remy_david in forum Qt Programming
    Replies: 0
    Last Post: 20th April 2011, 09:15
  2. Custom Model? Custom View? Custom Delegate?
    By Doug Broadwell in forum Newbie
    Replies: 4
    Last Post: 11th February 2010, 20:23
  3. Question about custom view (or custom delegate)
    By skuda in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2009, 20:06
  4. setSelection() in custom view
    By krudio in forum Qt Programming
    Replies: 13
    Last Post: 6th February 2008, 20:03
  5. Model-view: Creating a custom view
    By taboom in forum Qt Programming
    Replies: 5
    Last Post: 17th August 2007, 20:36

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.