How to display multiple lines of text



  • in qml how to display multiple lines of text?i use TextEdit,but it doesn't work



  • @
    wrapMode: TextEdit.WordWrap
    @



  • Can you post an example of what you're trying to do?



  • i have used wrapMode: TextEdit.WordWrap,but it also can't work
    ,because the text is too long,so i want to use multiple lines to
    display it!



  • sfjam: I guess you'll have to clarify what you want a bit more, because in my experience, it just works. Could you show us the faulty code?


  • Moderators

    Make sure that your TextEdit has a fixed width (either, through the width: property or by setting anchors.) If it doesn't then the width of the component is dynamic and it doesn't know where or when to wrap.



  • [quote author="sfjam" date="1308568992"]in qml how to display multiple lines of text?i use TextEdit,but it doesn't work[/quote]

    You say you use TextEdit to display multiple lines of text. Are you talking about displaying multiple lines of text or multi-line editor.


Log in to reply
 

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