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

    • 1b77fc5931bf14b2a9e936a8d08334d9e00ffe7e (pyside/pyside-setup/5.12)

    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
          Cristian Maureira-Fredes
        2. pyside-634.py
          0.6 kB
          Cristian Maureira-Fredes
        For Gerrit Dashboard: PYSIDE-634
        # Subject Branch Project Status CR V

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            cbenhagen Ben Hagen
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes