Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.4.3
-
None
Description
Here is a small example that reproduce the problem...Create a QGraphicsWidget(0,Qt::Popup) with a proxy inside...The widget inside the proxy doesn't work properly because the QGraphicsWidget seems to grab the mouse. With Qt::Window as the flag it works perfectly. All kind of childs don't receive events properly.
#include <QtGui>
class Popup : public QGraphicsWidget
{
public:
Popup() : QGraphicsWidget(0, Qt::Popup) // <--- Qt::Window "works" but loses popup functionality
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0)
{ painter->fillRect(option->rect, Qt::yellow); }};
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QGraphicsScene scene;
Popup* popup = new Popup;
popup->setGeometry(0, 0, 320, 200);
scene.addItem(popup);
QGraphicsView view(&scene);
view.show();
return app.exec();
}