Results 1 to 9 of 9

Thread: Creating Threads

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Posts
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Thumbs down Creating Threads

    Hi everyone,

    I'm new to QT programming.
    I try to create a threaded program using Qt3's QThread class. I create a class MyThread and try to start it from a main widget. But when I try to compile it gives linking errors saying that multiple diclarations for MyThread::run() and MyThread::stop(). How can I solve this problem.

    Qt Code:
    1. class MyThread : public QThread
    2. {
    3. public:
    4. MyThread()
    5. {};
    6.  
    7. void run()
    8. { printf("Working");};
    9.  
    10. void stop(){};
    11.  
    12. }
    To copy to clipboard, switch view to plain text mode 

    Please help me on this .....
    Last edited by machathu; 27th February 2006 at 04:13.

Similar Threads

  1. Replies: 8
    Last Post: 27th March 2013, 11:51
  2. Why do some QWidgets create own threads?
    By donglebob in forum Qt Programming
    Replies: 5
    Last Post: 6th July 2010, 17:01
  3. Problem creating a QWidget using threads
    By tarod in forum Qt Programming
    Replies: 1
    Last Post: 16th November 2007, 12:45
  4. Problem in creating thread in GUI application
    By jyoti kumar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 12:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.