Forums

OverviewFelgo 2 Support (Qt 5) › Error when using cursorInView with AppTextEdit

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20593

    Felgo User

    Hello,

    I’m having trouble getting the cursorInView to work properly. Here is my code:

    AppFlickable {
        id: commentTextFlick
        width: dp(100)
        height: dp(100)
        contentWidth: commentText.paintedWidth
        contentHeight: commentText.paintedHeight
    
        AppTextEdit {
            id: commentText
            width: commentTextFlick.width
            height: commentTextFlick.height
            verticalAlignment: AppTextEdit.AlignTop
            wrapMode: TextEdit.Wrap
            cursorInView: true
            flickable: commentTextFlick
        }
    }

    On page load, I get the following error twice, then the same error appears each time a character is entered into the text box.

    “qrc:/qml/VPlayApps/controls/AppTextEdit.qml:169: ReferenceError: textEdit is not defined”

    In addition, how can I get the placeholderText to wrap. The text entered directly wraps fine, but the placeholderText runs off the edge.

    Thank you for any help,

    Eric

    #20597

    Günther
    Felgo Team

    Hi, thanks for reporting the issue!

    For the cursorInView feature, the AppTextEdit expects to own the id: textEdit. You can avoid the error by using this id for your item instead of id: commentText.

    The next Felgo update will include a fix so you can again use any custom id for your AppTextEdit. Until then, please use the textEdit id for the item.

    Best,
    Günther

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support