Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Bug on Text element
Forum Updated to NodeBB v4.3 + New Features

Bug on Text element

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hoanghua
    wrote on last edited by
    #1

    I have a very simple Text element as
    @Text {
    id: label
    anchors.centerIn: parent
    text: qsTr("Hello the world!")
    width: 35
    wrapMode: Text.Wrap
    visible: false
    color: "gray"
    font.underline: true
    // textFormat: Text.RichText
    }@
    however, seems that there is a bug which make

    • the first line has correct color and underline
    • second line has wrong color (black) and no underline
    • third line has wrong color (black) but with underline

    Is there anyone having the same problem with me?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dmcr
      wrote on last edited by
      #2

      Could you give the entire code : this one is not visible, actually....

      dmcr

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hoanghua
        wrote on last edited by
        #3

        full page qml code as requested :-)
        @import QtQuick 1.1
        import com.nokia.meego 1.0

        Page {
        tools: commonTools

        Text {
            id: label
            anchors.centerIn: parent
            text: qsTr("Hello the world!")
            width: 35
            wrapMode: Text.Wrap
            visible: false
            color: "gray"
            font.underline: true
        

        // textFormat: Text.RichText
        }

        Button{
            anchors {
                horizontalCenter: parent.horizontalCenter
                top: label.bottom
                topMargin: 10
            }
            text: qsTr("Click here!")
            onClicked: {
                label.visible = true
            }
        }
        

        }@

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved