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] Change Text Color on touch
Qt 6.11 is out! See what's new in the release blog

[solved] Change Text Color on touch

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 3.6k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello,

    I am looking for a signal which is triggered when I touch the text-box but did not release my finger.
    It should be even before "onClick"

    (similar to this question http://qt-project.org/forums/viewthread/14868/ )

    Thank you

    [edit] link fixed, koahnig

    [edit2] Additionally, I need a signal when the user removes his finger from the text-box

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      A MouseArea element supports the onPressed and onReleased signals. Do they provide what you need?

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Thanks, this works.

        However, I found another solution:
        @color: mouse_area1.pressed ? #color1 : #color2@
        I didn't know before that this is also always checked when I write it in the Text { } section.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          In terms of declarative programming, your solution is of course much better for this purpose!

          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