I believe you can use Qt::CheckStateRole and Qt::ItemIsUserCheckable flags to display and edit the check box without using a delegate. For the line edit, you can probably cache a pixmap of a QLineEdit containing the cell text and bitblt that in the paint event. This will take some trickery - the delegate isn't visible until the item is edited, so you will need to make a dummy QLineEdit, paint it, and cache it when you initially fill the table and repaint it when the table is resized or changed.
But from a usability point of view, wouldn't it be very confusing to a user if every cell in a table looked like it was being edited all the time? You would have to pay very close attention to where the input cursor was in order to know which cell you were editing. This is not a very intuitive interface, in my opinion.




Reply With Quote


Bookmarks