Things become more weird now.
Please refer to this video http://www.visionopen.com/qgraphicsview_paintevent2.ogv
Now, after I changed my code a little bit to
this->m_QTGraphicsScene->invalidate();
this->repaint();
this->m_QTGraphicsScene->invalidate();
this->repaint();
To copy to clipboard, switch view to plain text mode
repaint() now is able to trigger paintEvent() as you can see from the above video file.
However, no matter it's
or
QPainter p(this);
or
QPainter p(this->viewport());
To copy to clipboard, switch view to plain text mode
in function paintEvent(),
I'm not able to display what has been drawn on the screen.
The processed image have been successfully stored, but it just didn't show up on the screen.
By the way, I guess why now paintEvent() was successfully triggered by
this->repaint() ; // which was supposed to have the same functionality with this->update();
this->repaint() ; // which was supposed to have the same functionality with this->update();
To copy to clipboard, switch view to plain text mode
is just because I overwrote all qt 4.6.2 related .so files, and reconstruct the symbolic links to qt 4.6.3 .so files.
We may neglect whether this is a qt 4.6.2 or qt 4.6.3 issue first.
But, as you may noticed from the video of this time,
paintEvent() is now successfully called whenever a new image is loaded (for processing),
but paintEvent() just didn't really draw the image on the screen.
Can you please help?
Cheers
JIA
Bookmarks