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

Qt Quick for Rust: implement qinvokable / qslot

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • None
    • Qt Bridges
    • Foundation Sprint 136, Foundation Sprint 137, Foundation Sprint 138

      We need a possibility to invoke rust functions from the QML side. In traditional Qt/QML these are functions marked as Q_INVOKABLE or Q_SLOTS.

      The currently suggested API is to use an attribute of the form

      #[qslot(cpp_name = "cppName")]
      fn some_function(&mut self, ...) {
          ...
      } 

      The function can be called with cppName from the QML side (Maybe remove cpp from the name?).

      The function should be callable with common standard and Qt types as parameters.

      We probably have to also make const qslots work.

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

            yuri.knigavko Yuri Knigavko
            matthias_rauter Matthias Rauter
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes