Hi,
if you want to use real widget all the time you can use QAbstractItemView.setIndexWidget but when you have many rows this is a performance problem, the usual method it is emulate the widget with QStyle.drawControl in the paint method of the delegate and load the real widget when editrole is active (like you have done), you can see here an example:

www.qtcentre.org/threads/26916-inserting-custom-Widget-to-listview

and you have many others of the same in the same forum, just search for 
drawControl.

Regards,
Miguel Angel.


El 26/04/10 07:03, AON LAZIO escribió:
Hi,
     We know how we can use delegate to create a button in QTableView
right? So it's like when the user double-click at an index in the table,
the button will pop up and when the user click elsewhere, it won't be a
push button anymore. Now my question is how to make a QPushButton stay
there in QTableView forever (no double click), so the user can click at
it anytime.
     Thanks

--
Passion is my style



_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to