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

  • Home
  • SEARCH
  • 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 6652349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:07:35+00:00 2026-05-26T01:07:35+00:00

I been trying and trying to get this to work but it just refuses

  • 0

I been trying and trying to get this to work but it just refuses to work. I read the QT documentation and I’m just unable to get the insert function to function. When I build I get the following complication errors

/home/mmanley/projects/StreamDesk/libstreamdesk/SDDatabase.cpp: In constructor 'SDDatabase::SDDatabase()':
/home/mmanley/projects/StreamDesk/libstreamdesk/SDDatabase.cpp:27:44: error: no matching function for call to 'QHash<QString, SDChatEmbed>::insert(const char [9], SDChatEmbed (&)())'
/usr/include/qt4/QtCore/qhash.h:751:52: note: candidate is: QHash<Key, T>::iterator         QHash<Key, T>::insert(const Key&, const T&) [with Key = QString, T = SDChatEmbed]
make[2]: *** [libstreamdesk/CMakeFiles/streamdesk.dir/SDDatabase.cpp.o] Error 1
make[1]: *** [libstreamdesk/CMakeFiles/streamdesk.dir/all] Error 2

here is the header file:

class SDStreamEmbed {
        Q_OBJECT
    public:
        SDStreamEmbed();
        SDStreamEmbed(const SDStreamEmbed &other);

        QString FriendlyName() const;

        SDStreamEmbed &operator=(const SDStreamEmbed &other) {return *this;}
        bool operator==(const SDStreamEmbed &other) const {return friendlyName == other.friendlyName;}

    private:
        QString friendlyName;
};

Q_DECLARE_METATYPE(SDStreamEmbed)

inline uint qHash(const SDStreamEmbed &key) {
    return qHash(key.FriendlyName());
}

and the implementation

SDStreamEmbed::SDStreamEmbed() {

}

SDStreamEmbed::SDStreamEmbed(const SDStreamEmbed& other) {

}

QString SDStreamEmbed::FriendlyName() const {
    return friendlyName;
}

and how I am invoking it

SDChatEmbed embedTest();
ChatEmbeds.insert("DemoTest", embedTest);

and the definition of ChatEmbeds

QHash<QString, SDStreamEmbed> StreamEmbeds;
  • 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-26T01:07:36+00:00Added an answer on May 26, 2026 at 1:07 am

    Replace:

    SDChatEmbed embedTest();
    

    with:

    SDChatEmbed embedTest;
    

    The compiler interprets the first line as a function declaration. This is visible in the error message: it deduces the following type for the second argument:

    SDChatEmbed (&)()
    

    and that’s a function signature.

    I don’t think you need an explicit QString cast/construction for the first argument since QString has a constructor that takes a const char*, so that one should get converted automatically.

    (See here for some interesting info.)

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

Sidebar

Related Questions

I've been trying to get the arithmetic if operator to work but I just
I've been trying to get this code to work for hours! All I need
I've been trying to get this module to work and no matter what I've
This is crazy, I have been trying for hours to get this to work.
I been trying to get sqlcachedependecy working, but it doesn't appear to work I
I've been trying to get this to work for a good few hours now,
I have been trying to get this working for quite a while now but
I've been trying to get this arrow toggle script work on my page. I
I've been trying to get this code to work for what feels like an
I've been beating my head against the wall trying to get this to work,

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.