Results 1 to 2 of 2

Thread: Andoid text spaces and disabling native controls?!

  1. #1
    Join Date
    Dec 2015
    Location
    Austria
    Posts
    23
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default Andoid text spaces and disabling native controls?!

    Hi,

    I have created some views in qml and they look good in Windows.
    But if i run it on Android there is some issue? with "Text" Objects
    It seems that the ' ' (Space) is very very wide ans so the texts look ugly

    eg.:
    On Windows it Looks like:
    Qt Code:
    1. Hello i am a test text 1
    To copy to clipboard, switch view to plain text mode 

    On Android it Looks like
    Qt Code:
    1. Hello i am a test text [B]1[/B]
    To copy to clipboard, switch view to plain text mode 
    And the number (1) looks like it's bold and maybe has a bigger font size?!


    Here the QML:
    Nothing fancy
    Qt Code:
    1. Text {
    2. id: labelObject
    3. anchors.fill: parent;
    4. anchors.leftMargin: guiTheme.view.standardLeftMargin
    5. height: 30
    6. color: guiTheme.app.textColor
    7. font.pixelSize: guiTheme.app.textSize
    8. font.family: guiTheme.app.fontFamily
    9. verticalAlignment: Text.AlignVCenter
    10. }
    To copy to clipboard, switch view to plain text mode 


    And another thing is i'd like too look my app the same on every platform
    Is there a way to disable the native Styling of the Standard controls?


    Thanks!

  2. #2
    Join Date
    Dec 2015
    Location
    Austria
    Posts
    23
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default Re: Andoid text spaces and disabling native controls?!

    OMG!!

    I found the Problem
    I did not specify a fontFamily in my "Theme" Qml. On Windows it seems to be it uses a Standard font. In Android there is extrem wired behaviour.

Similar Threads

  1. Disabling drop over some controls
    By RenatoFerreira in forum Qt Programming
    Replies: 2
    Last Post: 15th June 2015, 10:54
  2. Remove all spaces in string except spaces in quotes
    By bnosam in forum Qt Programming
    Replies: 5
    Last Post: 26th June 2014, 03:37
  3. A text widget that handles line wrapping of white spaces?
    By Thuan Seah Tan in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2011, 23:17
  4. Replies: 1
    Last Post: 12th April 2010, 10:44
  5. How to read text file including all empty spaces..
    By umulingu in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2009, 07:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.