mirror of
https://forge.apps.education.fr/blender-edutech/jumeaux-numeriques.git
synced 2024-01-27 06:56:18 +01:00
Revenir à Qt5 pour GNU/Linux
This commit is contained in:
parent
1b742a4aeb
commit
9759e19a0a
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
from PyQt6 import QtWidgets
|
from PyQt5 import QtWidgets
|
||||||
from PyQt6.QtWidgets import QApplication, QFileDialog
|
from PyQt5.QtWidgets import QApplication, QFileDialog
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# twin_file_qt.py
|
# twin_file_qt.py
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
import sys
|
import sys
|
||||||
|
import random
|
||||||
import importlib
|
import importlib
|
||||||
|
import matplotlib
|
||||||
|
import matplotlib.pyplot as plts
|
||||||
import csv
|
import csv
|
||||||
import xml.etree.ElementTree as ET # Creating/parsing XML file
|
import xml.etree.ElementTree as ET # Creating/parsing XML file
|
||||||
|
|
||||||
import matplotlib
|
matplotlib.use('Qt5Agg')
|
||||||
import matplotlib.pyplot as plts
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
matplotlib.use('QtAgg')
|
|
||||||
from PyQt6 import QtCore, QtWidgets
|
|
||||||
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar
|
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar
|
||||||
|
import matplotlib.pyplot as plts
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# twin_plot_qt.py
|
# twin_plot_qt.py
|
||||||
# @title: Visualisation des données (pyQt6+Matplotlib)
|
# @title: Visualisation des données (pyQt5+Matplotlib)
|
||||||
# @project: Blender-EduTech
|
# @project: Blender-EduTech
|
||||||
# @lang: fr
|
# @lang: fr
|
||||||
# @authors: Philippe Roy <philippe.roy@ac-grenoble.fr>
|
# @authors: Philippe Roy <philippe.roy@ac-grenoble.fr>
|
||||||
@ -96,6 +98,9 @@ class DynamicPlot(QtWidgets.QMainWindow):
|
|||||||
super(MainWindow, self).__init__(*args, **kwargs)
|
super(MainWindow, self).__init__(*args, **kwargs)
|
||||||
self.canvas = MplCanvas(self, width=5, height=4, dpi=100)
|
self.canvas = MplCanvas(self, width=5, height=4, dpi=100)
|
||||||
self.setCentralWidget(self.canvas)
|
self.setCentralWidget(self.canvas)
|
||||||
|
n_data = 50
|
||||||
|
# self.xdata = list(range(n_data))
|
||||||
|
# self.ydata = [random.randint(0, 10) for i in range(n_data)]
|
||||||
self.xdata = [0]
|
self.xdata = [0]
|
||||||
self.ydata = [0]
|
self.ydata = [0]
|
||||||
self.update_plot()
|
self.update_plot()
|
||||||
@ -340,8 +345,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
# Application
|
# Application
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
if __name__ == "__main__":
|
||||||
# w = DynamicPlot()
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
w = MainWindow() # StaticPlot()
|
# w = DynamicPlot()
|
||||||
app.exec()
|
w = MainWindow() # StaticPlot()
|
||||||
sys.exit(0)
|
app.exec_()
|
||||||
|
sys.exit(0)
|
||||||
|
@ -233,4 +233,3 @@ class App(wx.App):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = App()
|
app = App()
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user