×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    48

    connect(signal()) does not work in qthread

    hi everybody;
    i have a problem with connect() in a thread. here is the code ;
    http://wiki.forum.nokia.com/index.ph...t_Mobility_API
    .how can i run this example in a thread. i am trying to run Locationwatcher::enable() in qthread


    MyThread ab ;
    ab.start();
    -----------------------
    my run function:

    Locationwatcher c;
    c.enable();
    -------------------
    enable func.


    connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)),
    this, SLOT(positionUpdated(QGeoPositionInfo)));
    source->startUpdates();

    ----------------------------------
    i think problem occurs in SIGNAL() and SLOT() ... is my way wrong?
    or How can i run this example in thread...
    thanks...

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: connect(signal()) does not work in qthread

    First make sure you've read the signal/slot documentation.

    Next, in case you're going cross-thread, review signals and slots acr0ss threads.

    Then review the connection types.

    Finally, any time you use "connect" capture the return code and test it with a Q_ASSERT.

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    48

    Re: connect(signal()) does not work in qthread

    thanks for reply;
    i read the pages but still confusing... could you tell me what is gonna changed?

Similar Threads

  1. connect to custom signal crash
    By Fillinger in forum Qt
    Replies: 7
    Last Post: 2010-07-26, 16:34
  2. QThread and MainWindow (Qt designer)
    By darksoul_e in forum Qt
    Replies: 11
    Last Post: 2010-05-18, 14:12
  3. My signal() doesn't work for standalone app
    By olliwang in forum Symbian
    Replies: 1
    Last Post: 2008-11-13, 14:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×