Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Plugins, signals and slots
Qt 6.12 LTS is out! See what's new in the release blog

Plugins, signals and slots

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.3k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    why Qt doesn't allow declaring methodes as signals or slots in the plugin interface?

    so i did the following
    i declared pure virtual functions ,but in the implementation ,i reimplamented them as signals and slots,
    then used the QPluginLoader to load the plugin,then used connect, and they worked fine when i tested them, so is this method recommanded and won't cause bugs or maybe there are other appropriate methods?

    @interface.h
    ...
    virtual void send(int)=0;
    ...@

    @interfaceplugin.h
    ....
    signals:
    void send(int);
    ....@

    then connect the plugin when i load it

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qxoz
      wrote on last edited by
      #2

      You need just declare signals and not need
      @virtual void send(int)=0;@
      and should be declared once, in interface.

      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
      • Unsolved