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. [solved] Program stops when it gets emitted signal
Forum Updated to NodeBB v4.3 + New Features

[solved] Program stops when it gets emitted signal

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.0k 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.
  • N Offline
    N Offline
    never_ever
    wrote on 11 Feb 2014, 10:53 last edited by
    #1

    Hi,
    I compile project rosterHandling from qxmpp library and there is signal rosterReceived() that is connected to slot rosterReceived(). So when program get that signal it should use method rosterRecived(), but insted of that it stops when it gets signal(as same as I would put in that place breakpoint - program wait until I click to continue).
    If anyone know where problem is?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JKSH
      Moderators
      wrote on 11 Feb 2014, 11:52 last edited by
      #2

      Hi,

      You'll need to provide some code.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • N Offline
        N Offline
        never_ever
        wrote on 11 Feb 2014, 12:02 last edited by
        #3

        There is nothing special in code that can not work so I do not know why it stops:
        @
        xmppClient client; //class that inherits from QXmppClient
        QXmppConfiguration config;
        config.setUser("user");
        config.setPassword("password");
        config.setDomain(mydomain);
        config.setSaslAuthMechanism("PLAIN");
        client.connectToServer(config)
        @
        In xmppClient constructor:
        @
        connect(&this->rosterManager(),SIGNAL(rosterReceived()),SLOT(rosterReceived()));
        @
        And method rosterReceived()
        @
        qDebug("Roster received");
        foreach(const QString &bareJid, rosterManager().getRosterBareJids())
        {
        QString name=rosterManager().getRosterEntry(bareJid).name();
        if(nam.isEmpty()) name="-";
        qDebug(Received: %s [%s]",QPrintable(bareJid),qPrintable(name));
        }

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JKSH
          Moderators
          wrote on 12 Feb 2014, 02:34 last edited by
          #4

          I don't see anything obviously wrong with your code.

          Does your program listen for mouse events?

          Did you set any breakpoints?

          Does _qDebug(“Roster received”);_ run before or after your mouse click?

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0

          1/4

          11 Feb 2014, 10:53

          • 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