Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7006413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:28:26+00:00 2026-05-27T21:28:26+00:00

I am trying to connect to BlueDevil::Manager::devicesChanged , but when I run my program

  • 0

I am trying to connect to BlueDevil::Manager::devicesChanged, but when I run my program I get the error Object::connect: No such slot Handler::changed(QList<Device*>) in src/handler.cpp:26 How can I fix this error? As far as I can see, changed has the correct type.

main.cpp:

#include <QApplication>

#include "handler.h"

int main(int argc, char **argv)
{
    QApplication app(argc, argv);

    Handler handler;

    return app.exec();
}

handler.h:

#include <bluedevil/bluedevil.h>

#include <iostream>

#include <QObject>

class Handler : public QObject
{
    Q_OBJECT

    public:
        Handler();

    public Q_SLOTS:
        void changed(const QList<BlueDevil::Device*> &devices);

    private:
        BlueDevil::Manager *manager;
        BlueDevil::Adapter *defaultAdapter;
};

handler.cpp

#include <bluedevil/bluedevil.h>

#include <iostream>

#include <QObject>

#include "handler.h"


using namespace BlueDevil;

void Handler::changed(const QList<Device*> &devices)
{
    Q_FOREACH (const Device *device, devices)
    {
        std::cout << qPrintable(device->friendlyName()) << std::endl;
    }
}

Handler::Handler() : QObject()
{
    manager = Manager::self();
    defaultAdapter = manager->defaultAdapter();

    connect(defaultAdapter, SIGNAL(devicesChanged(QList<Device*>)),
            this, SLOT(changed(QList<Device*>)));

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:28:28+00:00Added an answer on May 27, 2026 at 9:28 pm

    Try with:

    connect(defaultAdapter, SIGNAL(devicesChanged(QList<BlueDevil::Device*>)),
            this, SLOT(changed(QList<BlueDevil::Device*>)));
    

    SIGNAL and SLOT are macros, they can’t really be namespace-aware.

    If that doesn’t work, try:

    connect(defaultAdapter, SIGNAL(devicesChanged(QList<Device*>)),
            this, SLOT(changed(QList<BlueDevil::Device*>)));
    

    … and if that doesn’t work, you’ll have to put using namespace BlueDevil; in your header, and declare your slot with:

    void changed(const QList<Device*> &devices);
    

    and use your original connection. This is a bit sad.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to connect to EC2 over SSH I get the following error: joshua-scotts-macbook-pro:.ec2
When trying to connect to mysql I always get this error: java.sql.SQLException: No suitable
I'm trying to connect a GtkAction signal to the callback open_file but apparently I
Trying to connect to a SQL Server 2005 instance remotely but getting the following
I am trying to connect two of the same app with winsock, but the
Am trying to connect the App Delegate to the View Controller in Xcode4, but
I am trying to connect to Postgre using a PHP script, but it returns
I'm trying to connect to Amazon EC2 using OpenSSH in windows but I need
I am running into a weird error when trying connect to mongodb. I am
I'm trying to get an installation of webOrb 3.6.0.3 working, but am stuck getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.