Responsive Ad Area

Share This Post

test

Qt QML How to manually select word in TextArea

double click selects words, but i’d like to customise it to, for example, select the $1000 term.

Example:

import QtQuick 2.7
import QtQuick.Controls 1.4

ApplicationWindow
{
    visible: true
    width: 640
    height: 480

    TextArea
    {
        anchors.fill: parent
        text: "hello, try to select the $1000 prize!"
        font.pointSize: 14
    } 
}

For example, by somehow overriding selectWord or by overriding onDoubleClicked or by somehow adding my own MouseArea that doesn’t break the existing TextArea functionality.

Not sure how to do this.

Thanks for any help.


Qt QML How to manually select word in TextArea
Qt QML How to manually select word in TextArea
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar