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

QML Menu creation gives warning: Menu.qml:149: TypeError: Cannot read property '__contentItem' of null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.5.1
    • Fix Version/s: 5.6.0
    • Component/s: Quick: Controls 1
    • Labels:
      None
    • Environment:
      Windows
    • Commits:
      a7397a37145cd226f0a8a7bf89bd51cdc1b69025

      Description

      Creating a qml Menu dynamically , always gives console warning.
      Please find the test application as attached.
      Steps followed,

      • For Building used Qt5.5.1 MSVC2013 64bit
      • Application has one QML window and mousearea filled to it.
      • On MouseArea doubleClicked , creating custom menu using Utility.createCustomMenu() method
        -Menu will be launched
        -check the console / application logs

      output observed :

      Starting E:\Qt\sampleapps\testQMLMenu\debug\testQMLMenu.exe...
      QML debugging is enabled. Only use this in a safe environment.
      file:///E:/Qt/Qt5.5.1/5.5/msvc2013_64/qml/QtQuick/Controls/Menu.qml:149: TypeError: Cannot read property '__contentItem' of null
      qml: about to hide
      qml: cut menu clicked

        Attachments

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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            shriram.kulkarni Shriram Kulkarni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes