Results 1 to 2 of 2

Thread: Setting a single step value in a QTreeWidget

  1. #1
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Setting a single step value in a QTreeWidget

    Is there a way to set the single step of an item to 0.5 instead of 1?

    What I need is for the user to edit the value in a column and when the arrows appear the values should change in increments of 0.5.

    Any help will be appreciated.

    Pericles

  2. #2
    Join Date
    May 2012
    Posts
    136
    Thanks
    2
    Thanked 27 Times in 24 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Setting a single step value in a QTreeWidget

    I dont think it is possible for a QTreeWidgetItem to change the editor

    what you can do is to create an QTreeModel and use a QTreeView to show the data
    then you can use a QStyledItemDelegate to change the editor for a column

    check out the zipcode1 example from this page http://www.qtrac.eu/aqpbook.html (download the aqpbook.zip)
    they use an QStandardItemModel together with a QListView

Similar Threads

  1. Replies: 4
    Last Post: 23rd July 2012, 21:09
  2. Replies: 0
    Last Post: 3rd January 2011, 11:25
  3. Qt Creator Debugging step by step through else rich code does not work
    By Terjoqu in forum Qt Tools
    Replies: 1
    Last Post: 11th March 2010, 22:44
  4. Painting / moving in a single step to avoid flickering
    By nooky59 in forum Qt Programming
    Replies: 6
    Last Post: 21st February 2008, 11:33
  5. Step by Step MySQL Plugin... what's next step?
    By chaosgeorge in forum Qt Programming
    Replies: 20
    Last Post: 5th November 2006, 16:32

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.