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

instanceof QStringList

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 2 Posters 549 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.
  • M Offline
    M Offline
    Montjet
    wrote on last edited by
    #1

    Hi,
    How can I check object type (instanceof or w/e) of QStringList in QML?
    Array.isArray(obj) doesn't work.

    Gojir4G 1 Reply Last reply
    0
    • M Montjet

      Hi,
      How can I check object type (instanceof or w/e) of QStringList in QML?
      Array.isArray(obj) doesn't work.

      Gojir4G Offline
      Gojir4G Offline
      Gojir4
      wrote on last edited by
      #2

      @Montjet Hi,

      This is working for me

      if(obj instanceof Array)
          //Array OK
      else 
          //Not array
      

      How is your QStringList instance accessed from QML ? Is it exposed as a property ?

      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