×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    24

    QML Text element with Text.AlignJustify

    Hi

    I need to create a Text element with fully justified text. According to 4.7 Snapshot docs Text.AlignJustify is a valid value for Text.horizontalAlignment. But this does not appear in 4.7 Latest docs.

    The latest Qt Creator (2.2.1) seems to know about Text.AlignJustify but when it is specified as the value for Text.horizontalAlignment, I get the error: Unable to assign [undefined] to int horizontalAlignment.

    When will this option become available?

    Also I don't think I fully understand the difference between the "snapshot" docs and "latest", what is the difference?

    QQ

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: QML Text element with Text.AlignJustify

    hello QtQuries

    Yes there is some problem with the Enumeration related to Text horizontalAlignment Property instead try to use a integer directly, bad hack but will do the good.

    Otherwise you can also assign the property with a string value too like:

    Code:
     horizontalAlignment:"AlignRight"

Similar Threads

  1. How to optimize Text element with 10,000 words?
    By useryy2 in forum [Archived] Qt Quick
    Replies: 4
    Last Post: 2011-07-18, 05:32
  2. Wrap text around image with proper margin between image and text in QML?
    By pasi.hytonen@starcut.com in forum [Archived] Qt Quick
    Replies: 0
    Last Post: 2011-03-31, 07:58
  3. change svg text element
    By mehdi_shz11 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2010-09-28, 06:30
  4. Replies: 4
    Last Post: 2008-08-07, 04:40

Posting Permissions

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