im facing something similar ..
: QGraphicsObject(parent), m_bounds(bounds)
{
QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this);
dial->setFixedSize(m_bounds.width(), m_bounds.height());
dial->setFocusPolicy(Qt::StrongFocus);
dial->setMouseTracking(true);
dial->installEventFilter(this);
proxy->setWidget(dial);
proxy->setPos(0, 0);
}
ProxyWidget::ProxyWidget(const QRectF &bounds, QGraphicsItem *parent)
: QGraphicsObject(parent), m_bounds(bounds)
{
QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this);
QDial *dial = new QDial();
dial->setFixedSize(m_bounds.width(), m_bounds.height());
dial->setFocusPolicy(Qt::StrongFocus);
dial->setMouseTracking(true);
dial->installEventFilter(this);
proxy->setWidget(dial);
proxy->setPos(0, 0);
}
To copy to clipboard, switch view to plain text mode
bool
{
if (watched
->type
() == QEvent::MouseButtonPress ) {
qDebug()<<"Mouse Move Debug";
return true;
}
return true;
}
bool
ProxyWidget::eventFilter(QObject *obj, QEvent *watched)
{
if (watched->type() == QEvent::MouseButtonPress )
{
qDebug()<<"Mouse Move Debug";
return true;
}
return true;
}
To copy to clipboard, switch view to plain text mode
this not showing any dial view but if i remove installEventFilter then rest is fine ..
Bookmarks