started drawing

main
Benjamin Kraft 2 years ago
parent 8ccbf4fa03
commit 859235ee97
  1. 7
      src/Window.cpp
  2. 14
      src/main.cpp

@ -4,17 +4,16 @@
Window::Window() {
timer = new QTimer(this);
timer->setInterval(17);
connect(timer, &QTimer::timeout, this, [this](){
update();
});
connect(timer, &QTimer::timeout, this, [this]{ update(); });
timer->start();
label = new QLabel(this);
label->resize(size());
}
void Window::paintEvent(QPaintEvent *) {
void Window::paintEvent(QPaintEvent *event) {
auto output = new QPixmap(label->size());
output->fill(Qt::white);
game.draw(output);
label->setPixmap(*output);
}

@ -7,20 +7,6 @@ using std::cout, std::endl;
int main(int argc, char * argv[]){
QApplication app(argc, argv);
/*
for (int i = 0; i < 100'000; i++)
audioManager->playSound(1, i);
*/
/*
for (int i = 0; i < 10'000; i++){
FileManager->readFile("path" + std::to_string(i), [](const std::string& content){
std::cout << content << std::endl;
});
FileManager->writeFile("path" + std::to_string(i), "some content" + std::to_string(i));
}
*/
Window w;
w.show();

Loading…
Cancel
Save