mirror of
https://github.com/iperov/DeepFaceLive.git
synced 2024-12-25 15:31:13 -08:00
15 lines
556 B
Python
15 lines
556 B
Python
from PyQt6.QtWidgets import *
|
|
|
|
|
|
class QXDirDialog(QFileDialog):
|
|
def __init__(self, parent=None, caption : str = None, directory : str = None, accepted=None):
|
|
super().__init__(parent=parent, directory=directory)
|
|
self.setOption(QFileDialog.Option.DontUseNativeDialog)
|
|
self.setOption(QFileDialog.Option.ShowDirsOnly, True)
|
|
self.setFileMode(QFileDialog.FileMode.Directory)
|
|
if caption is not None:
|
|
self.setWindowTitle(caption)
|
|
if accepted is not None:
|
|
self.accepted.connect(accepted)
|
|
|