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

[solved] Change Text Color on touch

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.7k 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.
  • P Offline
    P Offline
    pascal95abc
    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

    Qt 4.7.3
    Symbian OS v9.4 / Symbian^1, S60 5th Edition
    on N97

    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
      • P Offline
        P Offline
        pascal95abc
        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.

        Qt 4.7.3
        Symbian OS v9.4 / Symbian^1, S60 5th Edition
        on N97

        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