Results 1 to 3 of 3

Thread: calling Gui treeWidget in Thread class

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default calling Gui treeWidget in Thread class

    hi
    i m not getting correct solution.
    I m writing coding like this....

    Qt Code:
    1. ////first class
    2. void DirThread::run()
    3. {
    4. if(!bAbort)
    5. {
    6. showDir();
    7. }
    8. }
    9. void DirThread ::showDir()
    10. {
    11. QTreeWidgetItem *pItem = NULL;
    12. pItem = new QTreeWidgetItem(///treeWidget from Gui class);
    13.  
    14. showDirView(pItem, strPath);
    15. }
    16. void DirThread ::showDirView(QTreeWidgetItem *pItem,QString strPath)
    17. {
    18. //loop up to size of dir
    19. //Recursivly showing dir
    20. for(///loop)
    21. {
    22. if(//dir)
    23. {
    24. showDirView(//treeItem,//path)
    25. }
    26. else
    27. {
    28. //file show
    29. }
    30. }
    31. }
    32.  
    33.  
    34. /////Gui class
    35. GuiClass::GuiClass(QWidget *parent):QDialog(parent)
    36. {
    37. setupUi(this);
    38. treeWidget->setColumnCount(1);
    39. }
    To copy to clipboard, switch view to plain text mode 


    ///I m using this treeWidget Dialog to show recursivly showing dir view
    using thread,,,how i call use treeWidget in Thread Method...
    please correct this one...
    Last edited by wysota; 16th May 2007 at 09:13.

Similar Threads

  1. How i will use treeWidget of GUI class in thread class
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 15th May 2007, 15:31
  2. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13

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.