MainWindow
Qt Base Class: QMainWindow
Signature: QMainWindow(self, parent: Optional[PySide6.QtWidgets.QWidget] = None, flags: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) -> None
Base classes
Name | Children | Inherits |
---|---|---|
WidgetMixin prettyqt.widgets.widget |
||
QMainWindow PySide6.QtWidgets QMainWindow(self, parent: Optional[PySide6.QtWidgets.QWidget] \= None, flags: PySide6.QtCore.Qt.WindowType \= Default(Qt.WindowFlags)) -> None |
Subclasses
Class | Module | Description |
---|---|---|
DetachedTab |
prettyqt.widgets.tabwidget | |
IconBrowser | prettyqt.custom_widgets.iconbrowser | |
ObjectBrowser | prettyqt.custom_widgets.objectbrowser | |
SidebarWidget | prettyqt.custom_widgets.sidebarwidget | |
QObjectDetailsDialog | prettyqt.debugging.qobjectdetailsdialog |
⋔ Inheritance diagram
graph TD
1473296227584["widgets.MainWindow"]
1473293688240["widgets.WidgetMixin"]
1473299815024["core.ObjectMixin"]
140713234304496["builtins.object"]
1473245548480["gui.PaintDeviceMixin"]
1473290635936["QtWidgets.QMainWindow"]
1473290849680["QtWidgets.QWidget"]
1473288842240["QtCore.QObject"]
1473291690208["Shiboken.Object"]
1473300082368["QtGui.QPaintDevice"]
1473293688240 --> 1473296227584
1473299815024 --> 1473293688240
140713234304496 --> 1473299815024
1473245548480 --> 1473293688240
140713234304496 --> 1473245548480
1473290635936 --> 1473296227584
1473290849680 --> 1473290635936
1473288842240 --> 1473290849680
1473291690208 --> 1473288842240
140713234304496 --> 1473291690208
1473300082368 --> 1473290849680
1473291690208 --> 1473300082368
🛈 DocStrings
Bases: WidgetMixin
, QMainWindow
Main application window.
Source code in prettyqt\widgets\mainwindow.py
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 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
|
add_toolbar(toolbar: widgets.QToolBar, area: constants.ToolbarAreaStr | constants.ToolBarArea | Literal['auto'] = 'auto')
Adds a toolbar to the mainmenu at specified area.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toolbar |
QToolBar
|
toolbar to use |
required |
area |
ToolbarAreaStr | ToolBarArea | Literal['auto']
|
area of the toolbar |
'auto'
|
Source code in prettyqt\widgets\mainwindow.py
add_toolbar_break(position: constants.ToolbarAreaStr | constants.ToolBarArea = 'top')
Adds a toolbar break to the given area behind the last item.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position |
ToolbarAreaStr | ToolBarArea
|
position of the toolbar |
'top'
|
Source code in prettyqt\widgets\mainwindow.py
get_tab_shape() -> widgets.tabwidget.TabShapeStr
get_tool_button_style() -> constants.ToolButtonStyleStr
Return current tool button style.
save_window_state(recursive: bool = False)
Save current window state as QSetting.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
recursive |
bool
|
Description |
False
|
Source code in prettyqt\widgets\mainwindow.py
set_tab_shape(shape: widgets.tabwidget.TabShapeStr | widgets.QTabWidget.TabShape)
Set tab shape for the tabwidget.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shape |
TabShapeStr | TabShape
|
tab shape to use |
required |
Source code in prettyqt\widgets\mainwindow.py
set_widget(widget: widgets.QWidget | None) -> widgets.QWidget | None
Set widget and return previous one if existing.
⌗ 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 |
|
iconSize |
QSize | |
toolButtonStyle |
Qt::ToolButtonStyle | |
animated |
bool | |
documentMode |
bool | |
tabShape |
QTabWidget::TabShape | |
dockNestingEnabled |
bool | |
dockOptions |
QFlags |
|
unifiedTitleAndToolBarOnMac |
bool |