Hi ,
It seems i got the problem. Actually class Qucsview is inherited from Q3ScrollView. Q3ScrollView has a virtual function called drawContents. In code of QT3.3 there is some painting done in drawContents [ painting of grid structure]. Now when i draw a QImage on this widget then that QImage go below to that grid painting and that is why anything is not visible on mouse movement.
Following is drawContents code:
void QucsView
::drawContents(QPainter*p,
int,
int,
int,
int) {
Some code for drawing grid
}
void QucsView::drawContents(QPainter*p,int,int,int,int)
{
Some code for drawing grid
}
To copy to clipboard, switch view to plain text mode
Now in paintEvent function when i draw QImage by following:
{
this.drawImage(0,0,main_image);
}
void QucsView::paintEvent(QPaintEvent *event)
{
QPainter p(this);
this.drawImage(0,0,main_image);
}
To copy to clipboard, switch view to plain text mode
The QImage goes below the grid painting. So any action on QImage on mouse movement is not visible. Any suggestions how to deal with this issue.
thanks
shivam
Bookmarks