Re: [PyQt] button delegate in a tableview

2013-01-30 Thread Mads Ipsen
Hi, You could consider using setIndexWidget() on the TableView. But some care should be taken if you also use a QSortFilterProxyModel for filtering your data. Best, Mads On 01/30/2013 11:32 AM, Cristobal Infante wrote: Hi, Sorry to bump this thread again. I am almost done with my PYQT ap

Re: [PyQt] button delegate in a tableview

2013-01-30 Thread Cristobal Infante
Hi, Sorry to bump this thread again. I am almost done with my PYQT application but I still have this glitch on my button delegate.. Are there any alternatives to using buttons delegate in tableviews? But I need a button per row... Best, Cris On 8 November 2012 21:53, Cristobal Infante wrote

Re: [PyQt] button delegate in a tableview

2012-11-08 Thread Cristobal Infante
Hi Erik, Thanks again for your reply, It's good to know that at least I am making some progress with PyQt and have arrived to a dead end ;) To be honest I am fine with it, will just have to explain my users they will have to activate the cell before clicking. The important thing was to have my b

Re: [PyQt] button delegate in a tableview

2012-11-08 Thread Erik Janssens
Hi Chris, I'm not sure if this can be fixed, maybe you can ask this on the Qt info mailing list. If it can be fixed, I'm interested in the solution ;) What happens is, when the TableWidget receives a click, it creates an editor, but the editor has not yet received the click. That is perfect in

Re: [PyQt] button delegate in a tableview

2012-11-07 Thread Cristobal Infante
Hi Eric, Thanks for the tip, I've managed to get my button inside my tableview. There is only one thing that bothers me, not sure if it is a limitation or something I can fix. To be able to press a button, I need to "activate" the containing cell with a click. Once the cell is active I can press

Re: [PyQt] button delegate in a tableview

2012-11-06 Thread Erik . Janssens
The delegate itself can only paint, it cannot react to clicks, you should implement the createEditor method, the editor then reacts to clicks On Tuesday, November 06, 2012 09:59:03 PM Cristobal Infante wrote: Hi, I am trying to embed a button per row inside a tableview. My botton are drawing

[PyQt] button delegate in a tableview

2012-11-06 Thread Cristobal Infante
Hi, I am trying to embed a button per row inside a tableview. My botton are drawing correctly as delegates but are not reacting to any clicks. Should I be setting flags for this column? so far I have something like: if index.column() == 14: flags |= QtCore.Qt.ItemIsSelectable | QtCore