コード例 #1
0
ファイル: cannonfield.php プロジェクト: Shadrackn/php-qt
 protected function paintEvent($event)
 {
     $painter = new QPainter($this);
     $painter->setPen(Qt::NoPen);
     $painter->setBrush(new QBrush(new QColor(0, 0, 255)));
     $painter->translate(0, $this->rect()->height());
     $painter->drawPie(new QRect(-35, -35, 70, 70), 0, 90 * 16);
     $painter->rotate(-$this->currentAngle);
     $painter->drawRect(new QRect(30, -5, 20, 10));
     $painter->end();
 }
コード例 #2
0
ファイル: cannonfield.php プロジェクト: Shadrackn/php-qt
 protected function paintEvent($event)
 {
     $painter = new QPainter($this);
     $painter->drawText(200, 200, tr("Angle = ") . QString::number($this->currentAngle));
     $painter->end();
 }