C++ (Qt)while(!asleep()) sheep++;
C++ (Qt)void MyWidget::MyEventHandler1() { QPainter p(this); p.setPen(Qt::green); p.drawLine(0, 0, 100, 100); return; }
C++ (Qt)void MyWidget::paintEvent( QPaintEvent *event ) { #define x_pos 70 #define y_pos 25 QPainter p(this); QImage img("c:/temp/qwe.png"); //p.setPen(Qt::red); for(int i = x_pos; i < (x_pos+275); i += 25 ) p.drawLine(y_pos, i, y_pos+250, i); for(int i = y_pos; i < (y_pos+275); i += 25) p.drawLine(i, x_pos, i, x_pos+250); //p.drawImage(mouse_x, mouse_y, img); for(int i = 0; i < 10; i++) for(int j = 0; j < 10; j++) { if (i == j) p.drawImage((y_pos+1+i*25), (x_pos+1+j*25), img); } return; }
C++ (Qt)ui->label->setPixmap(QPixmap("c:/temp/qwe1.png"));