parent
722da695a3
commit
9e20b7c5d2
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from PyQt5.QtWidgets import QFileDialog
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Tools():
|
||||||
|
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def open_file(self, container):
|
||||||
|
''' Corresponds to 1.2
|
||||||
|
TODO Right now this is just copy&pasted. Clean this up.'''
|
||||||
|
options = QFileDialog.Options()
|
||||||
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
|
fileName, _ = QFileDialog.getOpenFileName(container,"QFileDialog.getOpenFileName()", "","All Files (*);;Python Files (*.py)", options=options)
|
||||||
|
if fileName:
|
||||||
|
return fileName
|
||||||
|
pass
|
Loading…
Reference in new issue