Results 1 to 3 of 3

Thread: Preventing display spinbox in tableview cells

  1. #1
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Preventing display spinbox in tableview cells

    Creating QTableView use predefined QSpinBox sometimes when the data which is passed to tableview is double or int!!! How to prevent this?

  2. #2
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: Preventing display spinbox in tableview cells

    I'm using custom proxy model for tableview and just don't want to let tableview show spinbox. How can i do that? Do i have to write custom delegate for table?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Preventing display spinbox in tableview cells

    You can disable editing in the view by setting NoTriggers as edit triggers or by disallowing editing in the model.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. display custom widget in a TableView
    By code_talker in forum Qt Programming
    Replies: 4
    Last Post: 4th August 2012, 22:40
  2. Unable to get my spinbox to display (all that shows is the associated label)
    By bschumacher in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 17th May 2012, 03:32
  3. Replies: 0
    Last Post: 28th October 2011, 19:46
  4. How to display cut cells in QTableWidget
    By danblanks in forum Qt Programming
    Replies: 0
    Last Post: 16th February 2011, 22:42
  5. TableView/Model Display Question
    By SixDegrees in forum Qt Programming
    Replies: 9
    Last Post: 27th August 2010, 10:06

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.