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. [SOLVED] QML point type
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QML point type

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 4.4k 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.
  • F Offline
    F Offline
    Fenix Voltres
    wrote on last edited by
    #1

    It's probably silly question, but how to use QML point type?
    I want to declare own property of type point and got no clue how to do it -
    @property point myPoint: "10, 20"@
    gives me
    @Point is not a type@
    result...

    When temptation brings me to my knees
    And I lay here drained of strength
    Show me kindness
    Show me beauty
    Show me truth

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      Hi,

      It isn't currently possible to declare point-type properties from QML, so you'll need to do something like:

      @property variant myPoint: Qt.point(10,20)@

      instead.

      Regards,
      Michael

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Fenix Voltres
        wrote on last edited by
        #3

        Thank you, this is exactly what I wanted.

        When temptation brings me to my knees
        And I lay here drained of strength
        Show me kindness
        Show me beauty
        Show me truth

        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