Draw the QGraphicsItem's thumbnail when moved to the view
hi, all
my application is graphics/view module.
when I click my element toolbar which activate the element insert action, I want to create
the element thumbnail which moves follow the mouse ,when released , create the element at the release position. I try the Drag/Drop method, which not worked well ,and then I try to reimplement the mousemovement ,
when the element action toggled
Code:
// when the element add action toggled ,I set the m_pasteHereAction ture.
if(this->m_pasteHereAction)
{
painter.drawRect(e->pos().x(),e->pos().y(), 200,100);
}
it is not work,any helps ,thanks very much !