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

Access and alias problem

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 206 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 9 Feb 2021, 11:03 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
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 10 Feb 2021, 06:40 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

      1/2

      9 Feb 2021, 11:03

      • Login

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