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

Qt Code:
  1. // when the element add action toggled ,I set the m_pasteHereAction ture.
  2. void DiagramView::mouseMoveEvent(QMouseEvent *e)
  3. if(this->m_pasteHereAction)
  4. {
  5. QPainter painter(this);
  6. painter.drawRect(e->pos().x(),e->pos().y(), 200,100);
  7. }
To copy to clipboard, switch view to plain text mode 
it is not work,any helps ,thanks very much !