Goug
15th November 2011, 02:40
Hi,
I've created a QTableView and populated it with a custom model. I need to display the table in a scene, so I've created a QGraphicsProxyWidget and set the QTableView as its widget. It displays reasonably fine...much fine-tuning to do, but the data is there, and my vertical scroll bar appears as intended.
The problem I'm having is that the QTableView isn't getting any mouse or keyboard events. I can't grab the scroll bar, click on a column heading, select a cell, etc. Using page up/page down to scroll doesn't do anything either. I tried setting the ItemIsFocusable flag, but that didn't appear to make any difference.
I experimented with a QTextEdit widget many months ago in a QGraphicsProxyWidget, and I don't recall any problems entering text into it without doing anything special, so I'm at a bit of a loss here.
Suggestions?
Thanks,
Doug
I've created a QTableView and populated it with a custom model. I need to display the table in a scene, so I've created a QGraphicsProxyWidget and set the QTableView as its widget. It displays reasonably fine...much fine-tuning to do, but the data is there, and my vertical scroll bar appears as intended.
The problem I'm having is that the QTableView isn't getting any mouse or keyboard events. I can't grab the scroll bar, click on a column heading, select a cell, etc. Using page up/page down to scroll doesn't do anything either. I tried setting the ItemIsFocusable flag, but that didn't appear to make any difference.
I experimented with a QTextEdit widget many months ago in a QGraphicsProxyWidget, and I don't recall any problems entering text into it without doing anything special, so I'm at a bit of a loss here.
Suggestions?
Thanks,
Doug