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

sender().data() method not working when data is custom object

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 1.2.x, dev
    • Fix Version/s: dev
    • Component/s: PySide
    • Labels:
    • Commits:
      attaching sample code in case external link expires

      Description

      I'm trying to make a QAction pass a custom object as it's data, so I can grab it via QWidget.sender().data()
      This works just fine for a default object like a dictionary, but not for a custom object that I need to use.

      This works fine in PySide 1.0.9 but PySide 1.2.1 always returns None when querying sender().data() from a QAction that has a custom object assigned to it's data.

      Here is some sample code that shows the problem:
      http://pastebin.com/U0Y7CHw3

      Cheers,
      frank
      _______

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              crmaurei Cristian Maureira-Fredes
              Reporter:
              frueter frank rueter
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes