Guest User

Untitled

a guest
Feb 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #pragma once
  2. #include "Kreis.h"
  3. #include <QApplication>
  4. #include <QPainter>
  5. #include <QPainterpath>
  6.  
  7. Ui::VariablenClass ui;
  8.  
  9.  
  10. Kreis::Kreis(QWidget *parent)
  11.     : QWidget(parent)
  12. {
  13. }
  14.  
  15. void Kreis::paintEvent(QPaintEvent *event)
  16. {
  17.     QPainter painter(ui.Circle);
  18.     painter.setRenderHint(QPainter::Antialiasing);
  19.     painter.setPen(QPen(QBrush(QColor::fromRgbF(0, 1, 0, 1)), 1));
  20.     painter.drawEllipse(100, 100, -10, -10);
  21. }
Add Comment
Please, Sign In to add comment