Results 1 to 3 of 3

Thread: QTableWidgetItem not enabled

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Lightbulb QTableWidgetItem not enabled

    Hi all,
    I have a QTableWidget.
    When I add QTableItemWidgetItem with the following code:
    Qt Code:
    1. int index=ui.tbwcategories->rowCount();
    2. ui.tbwcategories->insertRow(index);
    3.  
    4. itemName->setFlags(Qt::ItemIsUserCheckable);
    5. itemName->setCheckState(Qt::Unchecked);
    6. itemName->setText(query.value(1).toString());
    7. itemName->setToolTip(query.value(2).toString());
    8. ui.tbwcategories->setItem(index,1,itemName);
    9. itemId->setText(query.value(0).toString());
    10. ui.tbwcategories->setItem(index,0,itemId);
    To copy to clipboard, switch view to plain text mode 
    I see that inserted item is not enabled, like if it is setEnabled(false) or something alike... it is a right checkbox, but it is not active, not checkable.
    In documentation I didn't find anything about this, so here I am...

    I rely on you, my masters!
    Last edited by Raccoon29; 21st March 2008 at 17:48. Reason: spelling error
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

Similar Threads

  1. Centering An Icon In A QTableWidgetItem?
    By mclark in forum Qt Programming
    Replies: 3
    Last Post: 14th November 2007, 23:11
  2. QTableWidgetItem visual format
    By uygar in forum Qt Programming
    Replies: 5
    Last Post: 6th October 2007, 17:48
  3. Replies: 1
    Last Post: 21st August 2007, 16:25
  4. QTableWidgetItem and formatting / input masks
    By Walter in forum Qt Programming
    Replies: 3
    Last Post: 27th July 2007, 13:39
  5. Interesting little Segfault w/r to signal/slot connection
    By Hydragyrum in forum Qt Programming
    Replies: 24
    Last Post: 12th September 2006, 19:22

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.