Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. repeater
    Log in to post

    • SOLVED QVariantMap as model for Repeater
      QML and Qt Quick • layout repeater qvariantmap • • Kyeiv  

      5
      0
      Votes
      5
      Posts
      158
      Views

      @Kyeiv https://doc.qt.io/qt-5/qtquick-modelviewsdata-modelview.html#models those are your possibilities
    • UNSOLVED Connections in Repeater and "deprecated implicitly defined onFoo properties" VS "functions are not supported in UI"
      QML and Qt Quick • qml repeater connections • • Hitokage  

      7
      0
      Votes
      7
      Posts
      432
      Views

      @LeLev Many thanks!
    • SOLVED How to access QML Repeater delegate items in C++?
      General and Desktop • qml repeater • • RAJEESHR  

      4
      0
      Votes
      4
      Posts
      245
      Views

      @raven-worx thanks. it works.! Thank you all for ur supports.
    • SOLVED Use repeater inside chartview
      QML and Qt Quick • repeater chartview areaseries • • Coen  

      6
      0
      Votes
      6
      Posts
      484
      Views

      Hereby a solution that works for me. Instead of using a repeater, this codesample works with the ChartView's onCompleted signal handler. In the onCompleted handler first three LineSeries are dynamically created, then an AreaSeries is created. ChartView { id: chartid anchors.fill: parent antialiasing: true //Valueaxis ValueAxis{ id:xAxis; min: 0; max: 40000; tickCount: 9 } ValueAxis{ id:yAxis; min: -200; max: 1400; tickCount: 17 } //Listmodel only for testing Area- and LineSeries concept ListModel{ id: listModel ListElement { x1: 18000; y1: -100; x2: 18000 ; y2: 400 } ListElement { x1: 25000; y1: -100; x2: 25000 ; y2: 1000 } ListElement { x1: 31000; y1: -100; x2: 31000 ; y2: 1200 } ListElement { x1: 36500; y1: -100; x2: 39700 ; y2: 1250 } } Component.onCompleted: { var count = listModel.count; for(var i = 0;i < count;i ++) { if (i < count - 1) // add LineSeries { var lineTypeSeries = chartid.createSeries(ChartView.SeriesTypeLine, "line" + i, xAxis, yAxis); lineTypeSeries.color = "black"; lineTypeSeries.width = 2; lineTypeSeries.borderWidth = 0; lineTypeSeries.append(listModel.get(i).x1, listModel.get(i).y1); lineTypeSeries.append(listModel.get(i).x2, listModel.get(i).y2); } else { var areaTypeSeries = chartid.createSeries(ChartView.SeriesTypeArea, "area" + i, xAxis, yAxis); areaTypeSeries.pointsVisible = true; areaTypeSeries.color = "lightgrey"; areaTypeSeries.borderColor = "black"; areaTypeSeries.borderWidth = 2; areaTypeSeries.lowerSeries = chartid.createSeries(ChartView.SeriesTypeLine, "lowerSerie"); areaTypeSeries.lowerSeries.width = 0; areaTypeSeries.lowerSeries.borderWidth = 0; areaTypeSeries.lowerSeries.color = areaTypeSeries.borderColor; areaTypeSeries.lowerSeries.capStyle = 0x00; areaTypeSeries.lowerSeries.append(listModel.get(i).x1, listModel.get(i).y1); areaTypeSeries.lowerSeries.append(listModel.get(i).x2, listModel.get(i).y1); areaTypeSeries.upperSeries.append(listModel.get(i).x1, listModel.get(i).y2); areaTypeSeries.upperSeries.append(listModel.get(i).x2, listModel.get(i).y2); } } } }
    • UNSOLVED Access qml object that was defined in python and dynamically (?) used in a repeater
      QML and Qt Quick • repeater dynamically python access • • SietseAchterop  

      1
      0
      Votes
      1
      Posts
      204
      Views

      No one has replied

    • UNSOLVED Reading "state" value of a delegate from a repeater
      QML and Qt Quick • qml binding repeater • • Ankit.Jain  

      1
      0
      Votes
      1
      Posts
      149
      Views

      No one has replied

    • UNSOLVED bindings inside Repeater to outside properties don't work (?)
      QML and Qt Quick • binding repeater • • jimav  

      4
      0
      Votes
      4
      Posts
      407
      Views

      Ok, it looks like a bug introduced since Qt 5.8. I filed a bug report: https://bugreports.qt.io/browse/QTBUG-74332
    • SOLVED nesting multiple Q_INVOKABLE methods
      QML and Qt Quick • property repeater nested invokable • • devDawg  

      6
      0
      Votes
      6
      Posts
      1181
      Views

      @KillerSmath Its working! NOTIFY did the trick. The final touch that I also included was to use a Q_INVOKABLE getModuleAt(i) instead of a Q_INVOKABLE getTextBodyAt(i); this allowed me direct access to the DataModule's property: Text{ text: dataModel.getModuleAt(index).TextBody } portion of datamodule.h: class DataModule: public QObject { Q_OBJECT Q_PROPERTY(QString TextBody MEMBER textBody NOTIFY textBodyChanged) . . . signals: void newVal(DataPiece*); void textBodyChanged(QString newText); Q_INVOKABLE method inside of the QML context class datamodel.h: Q_INVOKABLE DataModule *getModuleAt(int i); Brilliant! Thanks for the help mate. Hopefully this is helpful to others as well.
    • UNSOLVED Item on Repeater create and destroy when model changed
      QML and Qt Quick • model repeater • • helenebro  

      5
      0
      Votes
      5
      Posts
      2257
      Views

      Ok. Thank you for your answer. I never use QAbstractListModel. Do you have some keys to start ? What is difference between using QAbstractListModel and QQmlListProperty ? In which case is it better to use them ?
    • UNSOLVED QML ListView inside Repeater
      QML and Qt Quick • qml c++ listview model repeater • • Qmyo  

      2
      0
      Votes
      2
      Posts
      1770
      Views

      @Qmyo You can create a 2 Q_INVOKABLE functions. One will return the Repeater's model number and other will return ListView's models. You can make use of index attached property which can be passed to the Q_INVOKABLE functions to return particular model.
    • UNSOLVED How to access the view from an item delegate in Repeater element?
      General and Desktop • qml modelview repeater • • vhptt89  

      1
      0
      Votes
      1
      Posts
      423
      Views

      No one has replied

    • SOLVED How do I access the children of a repeater object in a function?
      QML and Qt Quick • qml javascript function repeater children • • dxmachina  

      5
      1
      Votes
      5
      Posts
      7122
      Views

      @dxmachina Well, that's not true ;) Just a little mistake. Happy coding! :D
    • UNSOLVED Access items in Grid from C++ code
      QML and Qt Quick • c++ item grid repeater access • • diredko  

      3
      0
      Votes
      3
      Posts
      1060
      Views

      Thanks for your reply.
    • Giving Repeater a custom ListModel places the first element on the bottom of the window
      QML and Qt Quick • qml qtquick listview repeater • • archeria  

      3
      0
      Votes
      3
      Posts
      1209
      Views

      Yeah, here you go: http://pastebin.com/7CZSCnsQ The problem is rep1. I figured it might be a bug in my Qt version and updated and now everything is broken and nothing will compile, so I can't give you a screenshot. But it's pretty much like in this fine paint art: http://imgur.com/jQHaAoL What I'm trying to show is that the 0. element is outside the the visible area, and if I resize it, it's still stuck to the bottom. Edit: I still have a backup of my system with the old version, so I could still roll back. But I want to wait, maybe someone can help me with the compiler errors first (other post).
    • GridLayout dynamically populated by model-driven repeater
      QML and Qt Quick • model gridlayout dynamic repeater • • pthomson  

      2
      2
      Votes
      2
      Posts
      2486
      Views

      Still looking for a solution to this, any ideas?