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

Naming conflict with QtQuick.Controls and IconImage

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • 6.8
    • 6.4.2, 6.5.3
    • Quick: Controls 2
    • None
    • Mac (Apple Silicon M1), macOS 13.6.3
    • All
    • e9f53d023 (dev)

    Description

      I have created my own QML component (in QML) called IconImage.

      This was fine until I added import QtQuick.Controls to a component that uses my IconImage whereupon Qt Creator showed conflicts.

      The problem:

      • Searching on Google and on Qt's full documented list of QML types, there is no IconImage, so it appears to be a fiction.
      • QTBUG-66829 requests that QQuickIconImage be made public as IconImage. This was as of Qt 5.10.0. There is much discussion but the issue is shown as 'Unresolved' (although confusingly it does also show a fix version as 6.0).
      • Neither current documentation nor documentation of Qt 5.15 LTS C++ classes include a QQuickIconImage.
      • If I import QtQuick.Controls then IconImage gets highlighted as though it exists, even if I haven't defined it.
      • If I import QtQuick.Controls and also define my own QML component IconImage then IconImage gets highlighted as expected, but my custom properties result in syntax/build errors.
      • The above issue also talked about IconLabel so I did a check and this too shows up as a valid type although I cannot find any documentation about it. The closest I could find was QTBUG-82369 reported Feb 2020.

      Are these private types that have somehow contaminated the pool of public QML types?

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            paulmasri Paul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes