-1
我正在使用Debian 8和python 2.7,anaconda環境。PyQt5 + QtOpenGL:QXcbIntegration錯誤
這是我的代碼:
from PyQt5 import QtCore, QtWidgets, QtOpenGL
import sys
class Ui_MainWindow(QtWidgets.QMainWindow):
def __init__(self, parent=None):
super(Ui_MainWindow, self).__init__(parent, flags=QtCore.Qt.FramelessWindowHint)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.setupUi(self)
def setupUi(self, MainWindow):
MainWindow.setWindowModality(QtCore.Qt.ApplicationModal)
MainWindow.setFixedSize(800, 600)
self.map = Map(self)
class Map(QtOpenGL.QGLWidget):
def __init__(self, parent=None):
super(Map, self).__init__(parent)
self.move(11, 148)
self.setFixedSize(545, 416)
app = QtWidgets.QApplication(sys.argv)
form = Ui_MainWindow()
form.show()
sys.exit(app.exec_())
我得到這個錯誤:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
難道我做錯了什麼?
在此先感謝。
編輯:
這是我的Qt的./configure。
這是我glxinfo
但仍然沒有工作。
該代碼適用於python3.5 + win7 + pyqt5.7,問題在於opengl方面.... glxinfo說什麼? – BPL
http://pastebin.com/tgQVrpFj。謝謝! –