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

Defining and calling a function named "update()" in QML crashes the app

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.2.0
    • 5.1.1
    • None

    Description

      import QtQuick 2.1

      Column {
      anchors.fill: parent

      Rectangle {
      color: "#ffeeee"
      height: parent.height / 2
      anchors.left: parent.left
      anchors.right: parent.right

      Text

      { anchors.centerIn: parent font.pixelSize: 16 text: "update()" }

      MouseArea {
      anchors.fill: parent
      onClicked:

      { update(); parent.color = "#99ff99"; }

      }
      }

      Rectangle {
      color: "#eeffee"
      height: parent.height / 2
      anchors.left: parent.left
      anchors.right: parent.right

      Text

      { anchors.centerIn: parent font.pixelSize: 16 text: "updateBla()" }

      MouseArea {
      anchors.fill: parent
      onClicked:

      { updateBla(); parent.color = "#99ff99"; }

      }
      }

      function updateBla()

      { console.log("WORKS!"); }

      function update()

      { console.log("KABOOM!"); }

      }

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            ptrmtrsc Petru Motrescu
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes