mirror of
https://forge.apps.education.fr/blender-edutech/jumeaux-numeriques.git
synced 2024-01-27 06:56:18 +01:00
Passage à Qt6
This commit is contained in:
parent
280123b0d5
commit
f49ffab656
Binary file not shown.
10
twin_config-bak.xml
Executable file
10
twin_config-bak.xml
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
<data>
|
||||||
|
<screen>
|
||||||
|
<width>1280</width>
|
||||||
|
<height>720</height>
|
||||||
|
<quality>1</quality>
|
||||||
|
</screen>
|
||||||
|
<plot>
|
||||||
|
<config>True</config>
|
||||||
|
</plot>
|
||||||
|
</data>
|
@ -1,6 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
from PyQt5 import QtWidgets
|
from PyQt6 import QtWidgets
|
||||||
from PyQt5.QtWidgets import QApplication, QFileDialog
|
from PyQt6.QtWidgets import QApplication, QFileDialog
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# twin_file_qt.py
|
# twin_file_qt.py
|
||||||
|
22
twin_file_wx.py
Normal file
22
twin_file_wx.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import wx
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# twin_file_wx.py
|
||||||
|
# @title: Selecteur de fichier (wxPython)
|
||||||
|
# @project: Blender-EduTech
|
||||||
|
# @lang: fr
|
||||||
|
# @authors: Philippe Roy <philippe.roy@ac-grenoble.fr>
|
||||||
|
# @copyright: Copyright (C) 2023 Philippe Roy
|
||||||
|
# @license: GNU GPL
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
app = wx.App()
|
||||||
|
frame = wx.Frame(None, -1, 'win.py')
|
||||||
|
# frame.SetDimensions(0,0,200,50)
|
||||||
|
|
||||||
|
openFileDialog = wx.FileDialog(frame, "Sélection du fichier de commande", "", "",
|
||||||
|
"Fichier Python (*.py)|*.py", wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
|
||||||
|
|
||||||
|
openFileDialog.ShowModal()
|
||||||
|
print(openFileDialog.GetPath())
|
||||||
|
openFileDialog.Destroy()
|
@ -1,19 +1,18 @@
|
|||||||
import sys
|
import sys
|
||||||
import random
|
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
|
||||||
|
|
||||||
matplotlib.use('Qt5Agg')
|
import matplotlib
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
|
||||||
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar
|
|
||||||
import matplotlib.pyplot as plts
|
import matplotlib.pyplot as plts
|
||||||
|
matplotlib.use('QtAgg')
|
||||||
|
from PyQt6 import QtCore, QtWidgets
|
||||||
|
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# twin_plot_qt.py
|
# twin_plot_qt.py
|
||||||
# @title: Visualisation des données (pyQt5+Matplotlib)
|
# @title: Visualisation des données (pyQt6+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>
|
||||||
@ -348,5 +347,5 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
# w = DynamicPlot()
|
# w = DynamicPlot()
|
||||||
w = MainWindow() # StaticPlot()
|
w = MainWindow() # StaticPlot()
|
||||||
app.exec_()
|
app.exec()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user