Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    signal and slot can not connect

    General and Desktop
    1
    2
    456
    Loading More Posts
    • 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.
    • EricWilson
      EricWilson last edited by

      I have two widgets, one of which have a signal 'void subMarket(string)', the other have a public slot 'void subMarket(string)'. I connect them and there is no compile error or run time warning, but when i emit the signal 'subMarket(string)', the slot function is not invoked, and there is not any warning. could anyone help me fix this problem?
      attach snapshot of two class:

      class mdwidget :public QWidget{
      Q_OBJECT
      public:
      mdwidget(MessageHub*_hub = 0);
      signals:
      void subMarket(string ins);
      public slots:
      };

      class MessageHub :public QObject{
      Q_OBJECT
      public:
      MessageHub(){}
      public slots :
      void subMarket(string ins);
      };

      EricWilson 1 Reply Last reply Reply Quote 0
      • EricWilson
        EricWilson @EricWilson last edited by

        @EricWilson
        ok, this bug turn out to be my mistake signal senders..

        1 Reply Last reply Reply Quote 0
        • First post
          Last post