Results 1 to 5 of 5

Thread: make each row of table widget not editable??

  1. #1
    Join Date
    Mar 2006
    Posts
    47
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    2

    Default make each row of table widget not editable??

    Hi,
    how to make each row of table widget not editable.
    Through qt designer or through coding.


    Thanks and Regards

  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: make each row of table widget not editable??

    Pass an appropriate combination of flags to QTableWidgetItem::setFlags(), leaving Qt::ItemIsEditable out.
    J-P Nurmi

  3. #3
    Join Date
    Mar 2006
    Posts
    47
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    2

    Default Re: make each row of table widget not editable??

    Hi,
    I read all the flags which flag i have to use to make tablewidget item editable.

    Thanks and Regards

  4. #4
    Join Date
    Mar 2006
    Posts
    47
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    2

    Default Re: make each row of table widget not editable??

    Hi,
    sorry, i want to make items in table widget not editable, by default items in table widge is editable.

    Thanks and Regards

  5. #5
    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: make each row of table widget not editable??

    Qt Code:
    1. // this gives you a selectable and enabled, but non-editable item
    2. item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

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

    milli (4th May 2011)

Similar Threads

  1. Replies: 3
    Last Post: 19th October 2006, 23:13
  2. Replies: 11
    Last Post: 8th September 2006, 00:15
  3. Dynamic updates to a table widget
    By guiGuy in forum Qt Programming
    Replies: 6
    Last Post: 1st June 2006, 21:24
  4. displaying any table on a qdatatable
    By Philip_Anselmo in forum Newbie
    Replies: 4
    Last Post: 9th May 2006, 23:12
  5. Replies: 4
    Last Post: 24th March 2006, 23: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.