maverick_pol
8th August 2007, 16:26
Hi guys,
I would like to paint a transparent widget(with crossPattern) on the QGraphicsView. I create a widget with QGraphicsView as its' parent, but nothing happens. While moving on the view I can't move on the exact rectangle where I specify the widget, but I can't see it. What is more I do not want that to happend; the widget should not accept any focus etc.
Here is a piece of code,
QWidget* panel;
panel = new QWidget(m_view);//m_view is the QGraphicsView
panel->setPaletteBackgroundColor(Qt::red);
panel->setFixedHeight(100);
panel->setFixedWidth(100);
panel->setBackgroundColor(Qt::red);
panel->setPaletteForegroundColor(Qt::red);
panel->setVisible(true);
panel->show();
How to make the widget visible?
How to force the widget to ignore any focus/mouseOver/mouseMove events?
Maverick
I would like to paint a transparent widget(with crossPattern) on the QGraphicsView. I create a widget with QGraphicsView as its' parent, but nothing happens. While moving on the view I can't move on the exact rectangle where I specify the widget, but I can't see it. What is more I do not want that to happend; the widget should not accept any focus etc.
Here is a piece of code,
QWidget* panel;
panel = new QWidget(m_view);//m_view is the QGraphicsView
panel->setPaletteBackgroundColor(Qt::red);
panel->setFixedHeight(100);
panel->setFixedWidth(100);
panel->setBackgroundColor(Qt::red);
panel->setPaletteForegroundColor(Qt::red);
panel->setVisible(true);
panel->show();
How to make the widget visible?
How to force the widget to ignore any focus/mouseOver/mouseMove events?
Maverick