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. Access and alias problem

Access and alias problem

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 257 Views 2 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.
  • Q Offline
    Q Offline
    qcoderpro
    wrote on last edited by
    #1

    Hi,

    Isn't the code TLineEditV2.qml incorrect? How to access text (property alias text: input.text) from main.qml while it's not in the scope ofFocusScope { but its child Rectangle? Also, isn't property alias input: input redundant?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      It is correct, yes.

      How to access text (property alias text: input.text) from main.qml while it's not in the scope ofFocusScope { but its child Rectangle?

      Make another alias property in that Rectangle.

      Also, isn't property alias input: input redundant?

      No, it exposes the input element to the outside - components which use TLineEditV2.

      (Z(:^

      1 Reply Last reply
      2

      • Login

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