Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. dbus
Forum Updated to NodeBB v4.3 + New Features

dbus

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 2 Posters 76 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.
  • O Offline
    O Offline
    OzzT
    wrote last edited by OzzT
    #1

    Using Arch Linux with KDE 6.5.1 and QT 6.10.
    I'm trying to write a QML script that will interact with KDE AcitivityManager using dbus.

    import QtQuick 6.10
    import QtCore 6.10
    import QtDBus 6.10
    Item {
        id: root
        
            DBusInterface {
                    id: activityManager
                    service: "org.kde.ActivityManager"
                    path: "/ActivityManager/Activities"
                    interfaceName: "org.kde.ActivityManager.Activities"
            }
        ....
    }
    

    When I run the script below I get error:

    qml6 main.qml
    QQmlApplicationEngine failed to load component
    file:///.../qml/main.qml:3:1: module "QtDBus" is not installed
    qml: Did not load any objects, exiting.

    I have qt6-declarative installed.

    I tried to check if QT recognize this module:

    /usr/lib/qt6/bin/qmlplugindump QtDBus 6.10
    qmlplugindump is deprecated.
    Please declare your types using QML_ELEMENT and related macros.
    Then utilize the build system to invoke qmltyperegistrar in order to
    generate qmltypes files.
    QQmlComponent: Component is not ready
    file:///typelist.qml:2:1: module "QtDBus" is not installed

    • How do I properly load QtDBus ?
    jsulmJ 1 Reply Last reply
    0
    • O OzzT

      Using Arch Linux with KDE 6.5.1 and QT 6.10.
      I'm trying to write a QML script that will interact with KDE AcitivityManager using dbus.

      import QtQuick 6.10
      import QtCore 6.10
      import QtDBus 6.10
      Item {
          id: root
          
              DBusInterface {
                      id: activityManager
                      service: "org.kde.ActivityManager"
                      path: "/ActivityManager/Activities"
                      interfaceName: "org.kde.ActivityManager.Activities"
              }
          ....
      }
      

      When I run the script below I get error:

      qml6 main.qml
      QQmlApplicationEngine failed to load component
      file:///.../qml/main.qml:3:1: module "QtDBus" is not installed
      qml: Did not load any objects, exiting.

      I have qt6-declarative installed.

      I tried to check if QT recognize this module:

      /usr/lib/qt6/bin/qmlplugindump QtDBus 6.10
      qmlplugindump is deprecated.
      Please declare your types using QML_ELEMENT and related macros.
      Then utilize the build system to invoke qmltyperegistrar in order to
      generate qmltypes files.
      QQmlComponent: Component is not ready
      file:///typelist.qml:2:1: module "QtDBus" is not installed

      • How do I properly load QtDBus ?
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote last edited by
      #2

      @OzzT said in dbus:

      How do I properly load QtDBus ?

      Is QtDBus installed?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      O 1 Reply Last reply
      0
      • jsulmJ jsulm

        @OzzT said in dbus:

        How do I properly load QtDBus ?

        Is QtDBus installed?

        O Offline
        O Offline
        OzzT
        wrote last edited by
        #3

        @jsulm said in dbus:

        @OzzT said in dbus:

        How do I properly load QtDBus ?

        Is QtDBus installed?
        Yes and seems to be working:
        ❯ which qdbus6
        /usr/bin/qdbus6

        jsulmJ 1 Reply Last reply
        0
        • O OzzT

          @jsulm said in dbus:

          @OzzT said in dbus:

          How do I properly load QtDBus ?

          Is QtDBus installed?
          Yes and seems to be working:
          ❯ which qdbus6
          /usr/bin/qdbus6

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote last edited by
          #4

          @OzzT One moment QtDBus is a C++ module, not QML. https://doc.qt.io/qt-6/qtdbus-index.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • O Offline
            O Offline
            OzzT
            wrote last edited by
            #5

            Thanks.
            Do I take from your answer that there is no interface to interact with dbus from QML other than external command such as qdbus?

            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