FileDialog
Qt Base Class: QFileDialog
Signature: QFileDialog(self, parent: PySide6.QtWidgets.QWidget, f: PySide6.QtCore.Qt.WindowType) -> None
QFileDialog(self, parent: Optional[PySide6.QtWidgets.QWidget] = None, caption: str = '', directory: str = '', filter: str = '') -> None
Base classes
Name | Children | Inherits |
---|---|---|
DialogMixin prettyqt.widgets.dialog |
||
QFileDialog PySide6.QtWidgets QFileDialog(self, parent: PySide6.QtWidgets.QWidget, f: PySide6.QtCore.Qt.WindowType) -> None |
⋔ Inheritance diagram
graph TD
1473296370080["widgets.FileDialog"]
1473296195376["widgets.DialogMixin"]
1473293688240["widgets.WidgetMixin"]
1473299815024["core.ObjectMixin"]
140713234304496["builtins.object"]
1473245548480["gui.PaintDeviceMixin"]
1473293773152["QtWidgets.QFileDialog"]
1473241356416["QtWidgets.QDialog"]
1473290849680["QtWidgets.QWidget"]
1473288842240["QtCore.QObject"]
1473291690208["Shiboken.Object"]
1473300082368["QtGui.QPaintDevice"]
1473296195376 --> 1473296370080
1473293688240 --> 1473296195376
1473299815024 --> 1473293688240
140713234304496 --> 1473299815024
1473245548480 --> 1473293688240
140713234304496 --> 1473245548480
1473293773152 --> 1473296370080
1473241356416 --> 1473293773152
1473290849680 --> 1473241356416
1473288842240 --> 1473290849680
1473291690208 --> 1473288842240
140713234304496 --> 1473291690208
1473300082368 --> 1473290849680
1473291690208 --> 1473300082368
🛈 DocStrings
Bases: DialogMixin
, QFileDialog
Dialog that allow users to select files or directories.
Source code in prettyqt\widgets\filedialog.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|
get_accept_mode() -> AcceptModeStr
get_directory() -> pathlib.Path
Return current directory.
returns current directory level as a Pathlib object
get_file_mode() -> FileModeStr
get_label_text(label: LabelStr | widgets.QFileDialog.DialogLabel) -> str
get_view_mode() -> ViewModeStr
set_accept_mode(mode: AcceptModeStr | widgets.QFileDialog.AcceptMode)
Set accept mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode |
AcceptModeStr | AcceptMode
|
accept mode to use |
required |
set_directory(path: datatypes.PathType)
set_extension_filter(extension_dict: dict[str, list[str]])
Set filter based on given dictionary.
dict must contain "'name': ['.ext1', '.ext2']" as key-value pairs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
extension_dict |
dict[str, list[str]]
|
filter dictionary |
required |
Source code in prettyqt\widgets\filedialog.py
set_file_mode(mode: FileModeStr | widgets.QFileDialog.FileMode)
Set the file mode of the dialog.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode |
FileModeStr | FileMode
|
mode to use |
required |
set_label_text(label: LabelStr | widgets.QFileDialog.DialogLabel, text: str)
Set the label text for button label.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label |
LabelStr | DialogLabel
|
button to set text for |
required |
text |
str
|
text to use |
required |
Source code in prettyqt\widgets\filedialog.py
set_view_mode(mode: ViewModeStr | widgets.QFileDialog.ViewMode)
Set view mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode |
ViewModeStr | ViewMode
|
view mode to use |
required |
⌗ Property table
Qt Property | Type | Doc |
---|---|---|
objectName |
QString | |
modal |
bool | |
windowModality |
Qt::WindowModality | |
enabled |
bool | |
geometry |
QRect | |
frameGeometry |
QRect | |
normalGeometry |
QRect | |
x |
int | |
y |
int | |
pos |
QPoint | |
frameSize |
QSize | |
size |
QSize | |
width |
int | |
height |
int | |
rect |
QRect | |
childrenRect |
QRect | |
childrenRegion |
QRegion | |
sizePolicy |
QSizePolicy | |
minimumSize |
QSize | |
maximumSize |
QSize | |
minimumWidth |
int | |
minimumHeight |
int | |
maximumWidth |
int | |
maximumHeight |
int | |
sizeIncrement |
QSize | |
baseSize |
QSize | |
palette |
QPalette | |
font |
QFont | |
cursor |
QCursor | |
mouseTracking |
bool | |
tabletTracking |
bool | |
isActiveWindow |
bool | |
focusPolicy |
Qt::FocusPolicy | |
focus |
bool | |
contextMenuPolicy |
Qt::ContextMenuPolicy | |
updatesEnabled |
bool | |
visible |
bool | |
minimized |
bool | |
maximized |
bool | |
fullScreen |
bool | |
sizeHint |
QSize | |
minimumSizeHint |
QSize | |
acceptDrops |
bool | |
windowTitle |
QString | |
windowIcon |
QIcon | |
windowIconText |
QString | |
windowOpacity |
double | |
windowModified |
bool | |
toolTip |
QString | |
toolTipDuration |
int | |
statusTip |
QString | |
whatsThis |
QString | |
accessibleName |
QString | |
accessibleDescription |
QString | |
layoutDirection |
Qt::LayoutDirection | |
autoFillBackground |
bool | |
styleSheet |
QString | |
locale |
QLocale | |
windowFilePath |
QString | |
inputMethodHints |
QFlags |
|
sizeGripEnabled |
bool | |
modal |
bool | |
viewMode |
QFileDialog::ViewMode | |
fileMode |
QFileDialog::FileMode | |
acceptMode |
QFileDialog::AcceptMode | |
defaultSuffix |
QString | |
options |
QFlags |
|
supportedSchemes |
QStringList |