PDA

View Full Version : QCompleter is not appearing on a widget added to a scene



Rodrigo.Celler
2nd December 2010, 15:01
Hi everyone,
well, on a normal QWidget the QCompleter works just fine.
I have no idea why it's not working on a QWidget added to a scene.


Thanks,
Rodrigo.

wysota
3rd December 2010, 00:10
Does it help if you set the Qt::BypassGraphicsProxyWidget window flag on the widget containing the completer?

Rodrigo.Celler
3rd December 2010, 12:22
Does it help if you set the Qt::BypassGraphicsProxyWidget window flag on the widget containing the completer?

It did not work. Actually, it made the program slower.

PS: The completer is on a QTextEdit inside the QWidget added to the scene, I took it from the QtDemo.

wysota
3rd December 2010, 12:38
It's likely this will simply not work without reimplementing QCompleter internals. You would have to at least call QCompleter::popup() with an appropriate rectangle based on the position of the proxy widget in the scene instead of the position of the real text edit (because it's not even visible and doesn't have valid coordinates).

Rodrigo.Celler
8th December 2010, 16:11
Hi again,
now I see that there's a bigger problem.
When I move the completer->popUp(), I have to set the valid coordinates of the view, not the scene, but I dont think there's a way to get the coordinates of the QWidget based on the view.