Qt Forum

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

    A little problem with signals

    QML and Qt Quick
    2
    4
    1494
    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.
    • T
      thehilmisu last edited by

      Hi everyone,

      I am kind of new to the qt and i had this problem.

      i have a signal defined as

      @signals:
      void dataReceived(QByteArray &data);@
      and i am calling this function/signal like this,
      @emit dataReceived(incoming_data);@

      and finally

      @connect(serialPort, SIGNAL(dataReceived(const QByteArray &)), this, SLOT(slot_newDataReceived(const QByteArray &)));@

      The problem is, i debug and see the data coming but when i said "connect", it should call this function @slot_newDataReceived(const QByteArray &)@ but nothing happens.

      Sorry about my english,
      Thanks

      1 Reply Last reply Reply Quote 0
      • L
        lgeyer last edited by

        You define a signal <code>dataReceived(QByteArray &)</code>, but you're trying to connect to a signal <code>dataReceived(const QByteArray &)</code>.

        1 Reply Last reply Reply Quote 0
        • T
          thehilmisu last edited by

          [quote author="Lukas Geyer" date="1325257719"]You define a signal <code>dataReceived(QByteArray &)</code>, but you're trying to connect to a signal <code>dataReceived(const QByteArray &)</code>.[/quote]

          Thanks,
          It works. i had so much work and i could have missed it.

          1 Reply Last reply Reply Quote 0
          • L
            lgeyer last edited by

            [quote author="thehilmisu" date="1325258157"]
            It works. i had so much work and i could have missed it. [/quote]

            Such things just happen. Having an eye on the debug help helps in such situations.

            <code>Object::connect: No such signal Object::dataReceived(const QByteArray&)</code>.

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