Results 1 to 7 of 7

Thread: View update problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Posts
    24
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    2

    Default Re: View update problem

    Yes my QThread subclass emit signals. When i use widget with setItemWidget() it happens but works fine if i do not use cell widget item.

    QTreeWidgetItem *item = new QTreeWidgetItem(_pView);
    //this works
    item->setText(0,url);
    item->setTextColor(0,QColor(Qt::blue) );
    //but this causes the problem.
    QLabel * widget = new QLabel(url,_pView);
    widget->setCursor(Qt::PointingHandCursor);
    _pView->setItemWidget(item,0, url);

    Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: View update problem

    Quote Originally Posted by prakash
    _pView->setItemWidget(item,0, url);
    Should this be?
    Qt Code:
    1. _pView->setItemWidget(item,0, widget);
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: View update problem

    Quote Originally Posted by prakash
    Yes my QThread subclass emit signals.
    Make sure to add Qt::QueuedConnection all your connections you make with that class.

Similar Threads

  1. Updating directory view in a QListView
    By Cruz in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2009, 23:48
  2. Replies: 6
    Last Post: 20th April 2006, 10:23
  3. hide/show screen update problem
    By SkripT in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2006, 17:49
  4. Problem with screen update...
    By mysearch05 in forum Qt Programming
    Replies: 2
    Last Post: 27th January 2006, 18:24
  5. Record update windowd entered data saving
    By MarkoSan in forum Qt Programming
    Replies: 56
    Last Post: 18th January 2006, 18:50

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.