Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-16143

qmlviewer resizes the text element root items inproperly

    XMLWordPrintable

Details

    Description

      The width of the following qml view with root item as Text element should be 300x200, instead it ends up being 61x14. Opening non-text elements when opened with qmlviewer.

      import QtQuick 1.0
      
      Text {
        width: 300
        height: 200
        onWidthChanged: console.log("width", width);
        onHeightChanged: console.log("height", height);
        onPaintedWidthChanged: console.log("paintedWidth", paintedWidth);
        text: "Hello world"
      }
      

      The width of the following qml view with root item as TextEdit element should be 300x200, instead it ends up being 304x200.

      import QtQuick 1.0
      
      TextEdit {
        width: 300
        height: 200
        onWidthChanged: console.log("width", width);
        onHeightChanged: console.log("height", height);
        onPaintedWidthChanged: console.log("paintedWidth", paintedWidth);
        text: "Hello world"
      }
      

      The width of the following qml view with root item as TextInput element should be 300x200, instead it ends up being 301x200.

      import QtQuick 1.0
      
      TextInput {
        width: 300
        height: 200
        onWidthChanged: console.log("width", width);
        onHeightChanged: console.log("height", height);
        onPaintedWidthChanged: console.log("paintedWidth", paintedWidth);
        text: "Hello world"
      }
      

      Tested on Ubuntu Linux 10.04.1 on top of Qt 4.7 branch sha 14b4c009f9b0b83d16aec9f5b396f97efd49458c.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes