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. QML var (array type) property initialization with QML objects
QtWS25 Last Chance

QML var (array type) property initialization with QML objects

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
arrayqmljavascriptinitialization
1 Posts 1 Posters 1.8k Views
  • 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.
  • AaroA Offline
    AaroA Offline
    Aaro
    wrote on last edited by
    #1

    I'm using Qt 5.5.1
    I can't seem to initialize a property with an array type with QML objects.

    Here are some statements:

    //your code here
    
    property MyQML myQML: MyQML {} // works
    property var myint: [3, 5] // works
    property var myQMLArray: [MyQML {}, MyQML {}] // doesn't work
    

    This behavior seems weird to me. Is this how it is supposed to be? Or am I missing something?

    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