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

QML Signal with QVariant to C++ Slot is not working in Qt5.3

    XMLWordPrintable

Details

    • 605777e6cf557dbaf2835c63562bf3fe1620ee45 (qtdeclarative)

    Description

      Are there some changes between Qt5.2 and Qt5.3 regarding to signal and
      slots behaviour?

      I've tried to switch to Qt5.3 but my Signals and Slots with QVariant are not
      working between QML and C++.

      I've written a small example that is working fine with Qt5.2 but not with Qt5.3. I get the following error during start-up of the application compiled with Qt5.3:

      QObject::connect: No such signal QQuickWindowQmlImpl_QML_0::qmlSignal2(QVariant) in ../railwaycoder-qml_cpp_signal_slots/main.cpp:21

      Example is hosted on bitbucket:
      Clone URL: https://railwaycoder@bitbucket.org/railwaycoder/qml_cpp_signal_slots.git

      I have found out that QVariant Signal is working in Qt5.3 if I change the QML Signal from:

      signal qmlSignal2(var anObject)

      to:

      signal qmlSignal4(variant anObject)

      In Qt5.2 both ways are working. Is this a bug or a wanted behaviour in Qt5.3?

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            railwaycoder railwaycoder
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes