Upgrade to PyQt6

main
Benjamin Kraft 2 years ago
parent a2b18a39a5
commit 11b81b1466
  1. 8
      25/25.py

@ -1,9 +1,9 @@
import sys import sys
import numpy as np import numpy as np
from PyQt5.QtCore import QTimer from PyQt6.QtCore import QTimer
from PyQt5.QtGui import QPixmap, QImage from PyQt6.QtGui import QPixmap, QImage
from PyQt5.QtWidgets import QApplication, QWidget, QLabel from PyQt6.QtWidgets import QApplication, QWidget, QLabel
def readGrid(fileName): def readGrid(fileName):
@ -73,7 +73,7 @@ class AnimatorWindow(QWidget):
colorArray[self.grid == ">"] = [40, 255, 40] colorArray[self.grid == ">"] = [40, 255, 40]
colorArray[self.grid == "v"] = [255, 40, 40] colorArray[self.grid == "v"] = [255, 40, 40]
image = QImage(colorArray.data, w, h, 3 * w, QImage.Format_RGB888) image = QImage(colorArray.data, w, h, 3 * w, QImage.Format.Format_RGB888)
return image.scaled(self.w, self.h) return image.scaled(self.w, self.h)
def step(self): def step(self):

Loading…
Cancel
Save