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
Forum Updated to NodeBB v4.3 + New Features

QML var (array type) property initialization with QML objects

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
arrayqmljavascriptinitialization
1 Posts 1 Posters 1.9k 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.
  • A Offline
    A Offline
    Aaro
    wrote on 30 Mar 2016, 02:23 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

    1/1

    30 Mar 2016, 02:23

    • Login

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