mirror of
https://forge.apps.education.fr/blender-edutech/ropy.git
synced 2024-01-27 08:23:20 +01:00
24 lines
720 B
Python
24 lines
720 B
Python
import sys
|
|
from PyQt6 import QtWidgets
|
|
from PyQt6.QtWidgets import QApplication, QFileDialog
|
|
|
|
###############################################################################
|
|
# rp_file_qt.py
|
|
# @title: Selecteur de fichier (pyQt6)
|
|
# @project: Ropy (Blender-EduTech)
|
|
# @lang: fr
|
|
# @authors: Philippe Roy <philippe.roy@ac-grenoble.fr>
|
|
# @copyright: Copyright (C) 2023-2024 Philippe Roy
|
|
# @license: GNU GPL
|
|
###############################################################################
|
|
|
|
def dialog():
|
|
file , check = QFileDialog.getOpenFileName(None, "Sélection du fichier de commande", "", "Python Files (*.py)")
|
|
if check:
|
|
return file
|
|
|
|
app = QApplication(sys.argv)
|
|
file = dialog()
|
|
print (file)
|
|
sys.exit(0)
|