void TestForm3::paintEvent(QPaintEvent *event)
{
QPainter painter(f_chem_rcho);
QPixmap rcho = QPixmap::fromMimeSource("mr3.png");;
QPixmap mr = QPixmap::fromMimeSource("mr_2.png");
painter.setClipRegion(QRegion(0,0,f_chem_rcho->width(),f_chem_rcho->height(),QRegion::Rectangle),QPainter::CoordDevice);
painter.drawPixmap(0,0,rcho);
bool flag = true;
int x = 0;
int y = 100;
switch(currentMR){
case 0: flag = false; break;
case 1: x = 94; y = 19; break; // rm1
case 2: x = 22; y = 18; break;
case 3: x = 93; y = 132; break;
case 4: x = 49; y = 82; break;
case 5: x = 224; y = 29; break;
}
if(flag){
painter.setClipRegion(QRegion(x,y,62,62,QRegion::Rectangle),QPainter::CoordDevice);
painter.drawPixmap(x,y,mr);
}
}