Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-634

No (obvious) way of emitting a signal with a named parameter to QML

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.6, 5.9, 5.11.2
    • Fix Version/s: None
    • Component/s: Documentation, PySide
    • Labels:

      Description

      In PyQt5 you would do:

      from PyQt5.QtCore import pyqtSignal
      
      sumResult = pyqtSignal(int, arguments=['sum'])
      sumResult.emit(42)
      

      And then in QML:

      onSumResult: console.log(sum)
      

        Attachments

        1. main.qml
          0.5 kB
        2. pyside-634.py
          0.6 kB
        For Gerrit Dashboard: PYSIDE-634
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              crmaurei Cristian Maureira-Fredes
              Reporter:
              cbenhagen Ben Hagen
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There is 1 open Gerrit change