Results 1 to 20 of 30

Thread: QThread exec proplem to stop...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QThread exec proplem to stop...

    this is my 2° QThread wo i write ...
    the class to get remote dir list work on apache2 now to get recursive dir and file list i like a QThread to speed up all... how i can tell QThread to paint data to a model...

    if i make a
    connect(this, SIGNAL(finished()), this, SLOT(PaintData()));
    not work ... but data exist...

    all class are on main attachment...


    Qt Code:
    1. class DavListDir : public QThread
    2. {
    3. Q_OBJECT
    4.  
    5. public:
    6. void run();
    7. void SetUrl( QUrl u );
    8. signals:
    9. void statusMessage(QString);
    10. void TimeEnd();
    11. private:
    12. QUrl urltogrep;
    13. HTTP_propfind *jobb;
    14. public slots:
    15. void PaintData();
    16. };
    17. void DavListDir::SetUrl( QUrl u )
    18. {
    19. urltogrep = QUrl(u);
    20. connect(this, SIGNAL(finished()), this, SLOT(PaintData()));
    21. }
    22.  
    23. void DavListDir::PaintData()
    24. {
    25. /* prepare to paint remote dir list on tree model */
    26. std::cout << "end cycle " << std::endl;
    27. std::cout << qPrintable(jobb->GetDAVData()) << std::endl;
    28. }
    29.  
    30. void DavListDir::run()
    31. {
    32. jobb = new HTTP_propfind(urltogrep);
    33. jobb->Start();
    34. exec();
    35. }
    To copy to clipboard, switch view to plain text mode 
    Attached Files Attached Files

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.