Closed craigstar closed 5 years ago
Hey, Thanks for reporting this. Can you add a copy of the full python program? Also share the version of PyQt that you are using.
I have not seen any OpenGL problems before though, so am not even sure where to start.
This is my simple program, And I found the problem also occurs even when I replace MapWidget()
with QWebEngineView(self)
. So this is a Qt problem I guess. Environment is Ubuntu 14.04.
import sys
from PyQt5.QtWidgets import QApplication, QVBoxLayout, QWidget
from PyQt5.QtCore import Qt
from pyqtlet import L, MapWidget
class MapWindow(QWidget):
def __init__(self):
# Setting up the widgets and layout
super().__init__()
self.mapWidget = MapWidget()
self.layout = QVBoxLayout()
self.layout.addWidget(self.mapWidget)
self.setLayout(self.layout)
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
widget = MapWindow()
sys.exit(app.exec_())
my GL related packages are:
pyopengl 3.1.0 pypi_0 pypi
pyopengl-accelerate 3.1.0 pypi_0 pypi
pyqt 5.9.2 py36h05f1152_2
pyqtgraph 0.10.0 py36h28b3542_3
python 3.6.8 h0371630_0
I found a solution. https://forum.qt.io/topic/81328/ubuntu-qopenglshaderprogram-shader-program-is-not-linked/2
This is not pyqtlet problem, It's qt's fault. By adding
import sys
if sys.platform.startswith( 'linux' ) :
from OpenGL import GL
at the beginning of the app, the problem solved.
Alright great! Let me know how you're planning to use pyqtlet.
@samhattangady seems like you should add pyopengl into requirements then
@samhattangady I'm developing a GUI tool to project my trajectories onto a satellite map.
@crayxt, pyopengl
is not a requirement to run any pyqtlet
apps. If it is required, then it is a requirement in PyQt5
.
Great thanks. I'll go ahead and close this issue.
Environment is Ubuntu 14.04。It works well in MacOs.
My Code:
Error: