Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Questions about plugin interfaces

Questions about plugin interfaces

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 966 Views 1 Watching
  • 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.
  • R Offline
    R Offline
    Resurrection
    wrote on last edited by
    #1

    Hi,
    I have two questions regarding the plugin interfaces I'd really like to answer. :-)

    1. Why is it often said that QObject is not supported in the interface? Signals and slots are very useful in interfaces and they can be easily declared there when the interface inherit from QObject. I understand that it makes the interface dependant on non-abstract class therefore requiring it to be present wherever it is used but I do not find it to be a drawback in project that is dependant on Qt libraries already. So is there any good reason not to use QObject in plugin interface? And if yes, is there a sensible way of getting signals and slots with plugins other than a) fooling around with meat object system or b) knowing other headers from the plugin having signals and slots?

    2. I could not get inherited interface to work. Is there a way for an interface to inherit from another interface / abstract class? I have a situation where several plugins would share part of an interface but would add some of their specific stuff to interface as well. How should the multiple interfaces inheritance be declared if it is possible?

    Thanks!

    Secrets are power.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Answer to number 1 comes partly from number 2, You can't implement a plugin implementing multiple interfaces if theses interfaces inherits from QObject.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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