Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › SectionSelect QML

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19982

    Felgo User

    Hi, I need custom selectionSelect QML with day type or how i can’t create like that. Thanks.

    #19985

    Günther
    Felgo Team

    Hi,

    the SectionSelect is a custom made QML type built with basic Qt Quick Components. You can create your own section select in a similar way.
    The main part is the SectionSelect::target, which refers to a ListView item of your application.

    The SectionSelect can then build an internal model based on the ListView data, and provide UI mechanisms to set ListView properties and use functions for controlling the view.

    You can for example use a Connections element to react to changes of ListView properties, e.g.:

    import QtQuick 2.0
    
    Item {
      id: sectionSelect
    
        property ListView target
    
      // ...
    
      Connections {
        target: sectionSelect.target
        onModelChanged: updateModel()
      }
    }

    The updateModel function within the SectionSelect type can then e.g. provide a UI for an adapted version if the target ListView’s model.

    Best,
    Günther

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.