Results 1 to 3 of 3

Thread: How to use QTableWidgetItem::Usertype?

  1. #1
    Join Date
    Oct 2008
    Location
    Aachen
    Posts
    20
    Thanks
    5
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Question How to use QTableWidgetItem::Usertype?

    Hi all,

    i want to plot values from a QTableWidget in qwt. Can anyone let me know how i can restrict the item types in every cells of my table to double values?

    In the Qt4 doc, i saw QTableWidgetItem::Usertype. Maybe it's the solution to my problem but i don't know how to use it.

    Thx a lot 4 the answers.

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

    Default Re: How to use QTableWidgetItem::Usertype?

    Create a custom delegate and return QDoubleSpinBox as editor. See the Spin Box Delegate Example for more details.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    yannwilfried (23rd October 2008)

  4. #3
    Join Date
    Oct 2008
    Location
    Aachen
    Posts
    20
    Thanks
    5
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Smile Re: How to use QTableWidgetItem::Usertype?

    Thanks a lot. It works!

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.