Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. A little problem with signals
Forum Updated to NodeBB v4.3 + New Features

A little problem with signals

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.7k Views 1 Watching
  • 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 Offline
    T Offline
    thehilmisu
    wrote on 30 Dec 2011, 14:56 last edited by
    #1

    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
    0
    • L Offline
      L Offline
      lgeyer
      wrote on 30 Dec 2011, 15:08 last edited by
      #2

      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
      0
      • T Offline
        T Offline
        thehilmisu
        wrote on 30 Dec 2011, 15:15 last edited by
        #3

        [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
        0
        • L Offline
          L Offline
          lgeyer
          wrote on 30 Dec 2011, 15:29 last edited by
          #4

          [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
          0

          1/4

          30 Dec 2011, 14:56

          • Login

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