Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Remarks for PySide6
Qt 6.11 is out! See what's new in the release blog

Remarks for PySide6

Scheduled Pinned Locked Moved Unsolved Qt for Python
1 Posts 1 Posters 277 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vol_tim
    wrote on last edited by
    #1

    Re: QScxmlStateMachine: how to pass arguments to events
    What works with
    SLOT('my_event(QScxmlEvent)')
    is
    @Slot(name='my_event(QScxmlEvent)')
    at least in PySide6 (6.5)

    @Slot(QScxmlEvent)
    def my_event(event: QScxmlEvent)
    pass
    adds class parameter definition with asterisk:
    my_event._slots
    ['void my_event(QScxmlEvent*)']

    Same for class member, but slot is registered in class dictionary.

    Type of event parameter is really PySide6.QtScxml.QScxmlEvent, but
    referencing event.data() in my_event() causes application crash for me, so, I'm using <log ... /> that looks more convenient for delivering data from state machine to application.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved