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

OnClickedListener and multiple buttons

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.0
    • 6.8.0 Beta1
    • QPA: Android
    • Android
    • 2024wk38s2FOQtforAndroid, 2024wk32s2FOQtforAndroid

    Description

      Hi

      It is unclear in java examble (qml_in_java_based_android_project) how to add second button to QML view. How this listener should work with multiple buttons ? 

      m_mainQmlComponent.connectOnClickedListener(
                          (String name, Void v)

      Now content of name is always "onClicked" (name of signal?)

      This warning is in logcat.
      W libqml_in_android_view_arm64-v8a.so: Mismatching argument types between QML signal (onClicked()) and the Java function (java/lang/Object). Sending null as argument.

      Something wrong in QML or Java side?

      This documentation is different as example project 
      https://doc.qt.io/qt-6/qml-in-android-studio-projects-example.html

      Should I use connectSignalListener or connectOnClickedListener?

      Attachments

        Issue Links

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

          Activity

            People

              nick_bennett Nicholas Bennett
              karppa Kari Väntönen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes