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

Document that you need to declare DEPENDENCIES in order to use other modules' C++ types in your module

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.8
    • 6.7.1
    • QML: Tooling
    • None

      Hi, I have a c++ class exposed to qml, which has signals with arguments of type "QPointF", "QRectF", "QColor", which according to the documentation should be automatically converted to qml types "point", "rect", "color". However, qmllint produces the following warnings:

      [build] Warning: main.qml:58:13: Type QPointF of parameter aPanDirectionVector in signal called sigPanInDirection was not found, but is required to compile onSigPanInDirection. Did you add all import paths? [signal-handler-parameters]
      [build]             onSigPanInDirection: aPanDirectionVector => root.scatterPlotModel.transformModel.gui_panInDirection(aPanDirectionVector)
      [build]             ^^^^^^^^^^^^^^^^^^^
      [build] Warning: main.qml:59:13: Type QRectF of parameter aSelectionArea in signal called sigSelectArea was not found, but is required to compile onSigSelectArea. Did you add all import paths? [signal-handler-parameters]
      [build]             onSigSelectArea: (aSelectionArea, aSelectionMode) => root.scatterPlotModel.gui_selectArea(aSelectionArea, aSelectionMode)
      [build]             ^^^^^^^^^^^^^^^
      

      c++ class:

      class PlottingMouseInteractionsUIComponent : public QObject {
          Q_OBJECT
          QML_ELEMENT
      
          // ...
      
      signals:
          void sigZoomAtMousePosition(const QPointF& aMousePos, double aZoomScaleFactor);
          void sigPanInDirection(const QPointF& aPanDirectionVector);
          void sigSelectAtPosition(const QPointF& aMousePos, const PlottingSelectionMode aSelectionMode);
          void sigSelectArea(const QRectF& aSelectionArea, const PlottingSelectionMode aSelectionMode);
      };
      

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

            qtqmlteam Qt Qml Team User
            friendnick Mykola Vankovych
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes