Qt World Summit: Submit your Presentation

[solved] Program stops when it gets emitted signal

  • 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?

  • Moderators


    You'll need to provide some code.

  • 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;
    In xmppClient constructor:
    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));

  • Moderators

    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?

Log in to reply