[solved] Change Text Color on touch



  • 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



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



  • 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.



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.