Hai
Thanks for ur reply
I am trying like this using event filter
legend->InstallEventFilter(this);
{
if(Object==ui->uPlot->legend())
{
if(Event
->type
()==QEvent::MouseMove) {
MainPlot
::ui->uPlot
->legend
()->setFrameStyle
(QFrame::Box);
MainPlot::ui->uPlot->legend()->setGeometry(a->x(),a->y(),ui->uPlot->legend()->width(),ui->uPlot->legend()->height());
}
}
}
legend->InstallEventFilter(this);
bool MainPlot::eventFilter(QObject *Object, QEvent *Event)
{
if(Object==ui->uPlot->legend())
{
if(Event->type()==QEvent::MouseMove)
{
QMouseEvent *a=static_cast<QMouseEvent*>(Event);
MainPlot::ui->uPlot->legend()->setFrameStyle(QFrame::Box);
MainPlot::ui->uPlot->legend()->setGeometry(a->x(),a->y(),ui->uPlot->legend()->width(),ui->uPlot->legend()->height());
}
}
}
To copy to clipboard, switch view to plain text mode
The legend widget is moving but not properly..
any suggestion pl.
by
Suree
INdia
Bookmarks