×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    3

    Unhappy Does QML Text support multiline properties

    I'm a new guy for QML.
    In our project, need to display 1 image, 1line title and 2line description in each List view items.
    For the 2 line description, is there any solution to help me to implement it. I found that QML Text element has no maximumLineCount property. If I set the elide to Text.ElideNone, the description may be displayed in 3 lines. Then what should I do?

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Location
    Magnitogorsk, Russia
    Posts
    536

    Re: Does QML Text support multiline properties

    Text item allows you to use HTML as a notation
    Code:
      Text {
            text: "<html>
            <ol>
             <li> Sift flour and sugar together into a bowl. Add a pinch of salt.
             <li> Beat milk and egg together, then add to dry ingredients. Beat until smooth.
             <li> Pour mixture into a pan on medium heat and cook until bubbles appear on the surface.
             <li> Turn over and cook other side until golden.
            </ol>
           </html>"
            anchors.fill: parent
            color: platformStyle.colorNormalLight
            font.pixelSize: 20
    }
    Check SDK example: QtSDK\Examples\4.7\declarative\modelviews\listview\expandingdelegates\qml\expandingdelegates.qml

Similar Threads

  1. Does QML Video element support seek feature?
    By xiaojun789 in forum [Archived] Qt Quick
    Replies: 10
    Last Post: 2011-07-04, 11:01
  2. Draw multiline text problem :(
    By darshan.gandhi in forum Symbian
    Replies: 1
    Last Post: 2010-07-30, 18:11
  3. draw multiline text
    By m_afatah in forum Symbian User Interface
    Replies: 5
    Last Post: 2009-06-25, 06:30
  4. Does appuifw.Text input support normal text?
    By bercobeute in forum Symbian
    Replies: 2
    Last Post: 2006-02-22, 08:43
  5. How to draw a long text into multiline text??
    By titoliu in forum Symbian
    Replies: 1
    Last Post: 2002-08-09, 11:15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×