[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] QPushButton embeded in QTableView (like forever)
From: Linos <info () linos ! es>
Date: 2010-04-26 7:28:11
Message-ID: 4BD5408B.6060102 () linos ! es
[Download RAW message or body]
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 PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic