What's the point of having focus if he wants to hide it?![]()
J-P Nurmi
that's true.but I think he wants to have keyboard navigation I think.
![]()
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
do you think this is bet solution to implement navigation of treeView which is already works fine insted of creating custom delegate and write several lines of code? I don't thinks so.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
can you describe which part I have to reimplement so that I can lose the focus rectangle?
the main reason why I want to do such things is that, I want to implement an outlook-like message list, and I think the best way is to use QTableWidget. do I proceed in the right direction or do you have any other suggestion ?
example
Qt Code:
{ Q_OBJECT public: virtual void drawFocus ( QPainter * /*painter*/, const QStyleOptionViewItem & /*option*/, const QRect & /*rect*/ ) const {} }; ... table->setItemDelegate(new MyDelegate()); for (int row = 0; row < 10; ++row) { for (int col = 0; col < 10; ++col) { table->setItem(row, col, item); } } ...To copy to clipboard, switch view to plain text mode
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
alisami (25th December 2008), Brecht (7th March 2013), giantdragon (21st June 2011), matthieu (30th May 2012)
that will do the trick but there is a minor bug ( I guess this is not a feature), when focus is deactivated, when a cell is double clicked for editing, after the editing, the focus rectangle becomes active again.
setting the item flags to un-editable mode fixes that problem.
is there a way to set the table as read-only so that none of the items are editable?
Bookmarks