You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
551 B
25 lines
551 B
|
|
|
|
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
|