hi all :) I'm very new to python. I have a problem with my code, it's a very simple rotating cube. I don't have any problem with this cube code with pygame screen but when I use it with pyqt (or Qt designer widgets), it runs but it shows nothing!!!
I'll be if glad someone could help me with it.tnx in advance
from OpenGL.GL import * from OpenGL.GLU import * from OpenGL import * from PyQt5.QtOpenGL import * from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import * import sys,time class MainWindow(QGLWidget): def __init__(self): super(MainWindow, self).__init__()
def paintGL(self): while True: #glRotatef(1,3,1,1) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) glBegin(GL_LINE) for self.edge in self.edges: for self.vertex in self.edge: glVertex3fv(self.verticies[self.vertex]) glEnd() glFlush() time.sleep(1)