Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Signals in QML Repeater
Forum Updated to NodeBB v4.3 + New Features

Signals in QML Repeater

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 187 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aleksun
    wrote on last edited by Aleksun
    #1

    I have a unit

    SomeUnit {
               x: 1
               y: 2
               width: 10
               height: 15
               unitId: "sensor#0"
            }
    

    inherited from Item (It's rectangle)
    And I need create some units.
    If I create it handly:

    SomeUnit { ... }
    SomeUnit { ... }
    

    my macro

    Q_PROPERTY(QString unitId READ unitId WRITE setUnitId NOTIFY unitIdChanged)
    

    works correctly.
    If I use Repeater with Grid :

    Grid {
                           ...
                    Repeater {
                        model: 50
                        SomeUnit {
                            width: 10
                            height: 15
                            unitId: "sensor#" + (index - 1)
                        }
                    }
                }
    

    macros doesn't work.
    Any cases?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved