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. QT6 QNetworkAccessManager::finished slot and signal discrepancy problem

QT6 QNetworkAccessManager::finished slot and signal discrepancy problem

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 193 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.
  • M Offline
    M Offline
    mortem
    wrote on last edited by
    #1

    Hello,
    I hope this goes is the right place to ask this question.

    I am getting "static assertion failed: Signal and Slot arguments are not compatible" while trying to connect QNetworkManager::finished -signal to a slot that should take QNetworkReply according to the documentation over here
    https://doc.qt.io/qt-6/qnetworkaccessmanager.html

    Here is my default constructor and the slot that is supposed to take the QNetworkReply parameter.

    GoodreadsDataPull::GoodreadsDataPull(QObject *parent, DataHandler &handler)
        : QObject{parent}
    {
        network_manager = new QNetworkAccessManager(this);
    
        connect(network_manager, &QNetworkAccessManager::finished, 
    this, &GoodreadsDataPull::BookSearchParse);
    }
    
    void GoodreadsDataPull::BookSearchParse(QNetworkReply *reply)
    {
    // some code to be written
    }
    
    

    Thanks in advance. If I have overlooked something obvious I apologize.
    ~Mortem

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

      Hi and welcome to devnet,

      Which exact version of Qt are you using ?

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

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Which exact version of Qt are you using ?

        M Offline
        M Offline
        mortem
        wrote on last edited by
        #3

        @SGaist

        Hello,
        It was indeed something obvious. I was using 5.15.12 and I changed it to 6.* and it works now. Thank you

        1 Reply Last reply
        0
        • M mortem has marked this topic as solved on

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved