Results 1 to 4 of 4

Thread: Making a QTableWidget Editable

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Making a QTableWidget Editable

    Hello again. I know it doesn't make sense to use ~Qt::ItemIsEditable, but it has worked in every other case. I tried I tried replacing the AND with an OR and removing the ~, but it still doesn't work. I tried installing an event filter on the object, but it doesn't seem to recognize my mouse clicks. I gets other events, but not QEvent::MouseButtonPress....

    EDIT:
    I figured it out. It was the ItemEditor that was eating the events.
    I had the following code:
    Qt Code:
    1. // EDITOR CALLS
    2.  
    3. QItemEditorCreatorBase *colorListCreator =
    4. new QStandardItemEditorCreator<ColorListEditor>();
    5.  
    6. factory->registerEditor(QVariant::Color, colorListCreator);
    7.  
    8. QItemEditorFactory::setDefaultFactory(factory);
    To copy to clipboard, switch view to plain text mode 
    And by doing that, it seemed to have been consuming the events. I have decided to remove the editor, and write a custom delegate to display the combo boxes in only specific columns.

    Thanks for all your input =)
    Last edited by llemes4011; 21st October 2010 at 19:29.

Similar Threads

  1. QTableWidget, one column editable
    By stella1016 in forum Qt Programming
    Replies: 5
    Last Post: 11th July 2012, 09:35
  2. trouble making simple DOM model example editable
    By Mamra in forum Qt Programming
    Replies: 6
    Last Post: 1st October 2009, 14:40
  3. QGraphicsTextItem is not editable
    By jano_alex_es in forum Newbie
    Replies: 2
    Last Post: 29th September 2009, 15:51
  4. how to set up a QHeaderView editable?
    By iguanna in forum Qt Programming
    Replies: 3
    Last Post: 24th March 2008, 14:37
  5. QTreeWidget - Making a Column editable.
    By Preeteesh in forum Qt Programming
    Replies: 1
    Last Post: 16th June 2007, 12:02

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
  •  
Qt is a trademark of The Qt Company.