Results 1 to 4 of 4

Thread: QTreeWidget refeshing view

  1. #1
    Join Date
    Aug 2009
    Posts
    3
    Thanks
    1

    Default QTreeWidget refeshing view

    Hi,

    I have a problem with QTreeWidget, I insert into QTreeWidget some widgets like QDoubleSpinBox or QLineEdit. When I try to hide them everything is ok since I don't resize the window or minimalize it, then all hiden widget from QTreeWidget are shown. Do you have any idea how to hide widget insert in QTreeWidget?

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTreeWidget refeshing view

    if you use delegates in a table widget then everything should work, because delegate keep track on editors. so, if you navigate from opened editor it will be hidden.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Aug 2009
    Posts
    3
    Thanks
    1

    Default Re: QTreeWidget refeshing view

    Can you explain me this? Now I using QTreeWidget and metod setItemWidget to set widget, how should I use delegates?

  4. #4
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QTreeWidget refeshing view

    if you are using those widgets as editors for data shown in treeView than you should use custom delegate and it's QAbstractItemDelegate::createEditor() and related methods.
    You can find an example in Qt Examples & Demos -> Item Views -> Spin Box Delegate
    to play a bit with sample application, and to open documentation (which can be also found here).
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  5. The following user says thank you to faldzip for this useful post:

    grazyna (13th August 2009)

Similar Threads

  1. Graphics View and the Pixmap
    By spawn9997 in forum Qt Programming
    Replies: 2
    Last Post: 26th June 2009, 22:12
  2. Model / View - Design Question
    By antarctic in forum Qt Programming
    Replies: 8
    Last Post: 8th June 2009, 07:39
  3. Graphics View Panning ,zooming
    By linuxdev in forum Qt Programming
    Replies: 3
    Last Post: 29th December 2008, 07:17
  4. World View Zooming factor
    By Pharell in forum General Programming
    Replies: 0
    Last Post: 6th November 2008, 13:04
  5. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 08:50

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.