Icon
Base classes
| Name | Children | Inherits |
|---|---|---|
SerializeMixinprettyqt.utils.serializemixin |
||
| QIcon PySide6.QtGui QIcon(self, /) -> None |
â‹” Inheritance diagram
graph TD
3907960597["gui.Icon"]
69336483["utils.SerializeMixin"]
2751680898["builtins.object"]
83249570["QtGui.QIcon"]
37984305["Shiboken.Object"]
69336483 --> 3907960597
2751680898 --> 69336483
83249570 --> 3907960597
37984305 --> 83249570
2751680898 --> 37984305
🛈 DocStrings
Bases: SerializeMixin, QIcon
Scalable icons in different modes and states.
Source code in prettyqt/gui/icon.py
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 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | |
for_mimetype(path: os.PathLike[str] | str) -> Self | None
classmethod
Try to create an icon from theme using the file mimetype.
Returns None if there is no theme icon for the mimetype.
Source code in prettyqt/gui/icon.py
from_char(char: str, background='black', color='white') -> Self
classmethod
Create a QIcon with a given character.
Source code in prettyqt/gui/icon.py
from_theme(name: ThemeIconStr | gui.QIcon.ThemeIcon | str, fallback: gui.QIcon | None = None) -> Self
classmethod
Create an icon from a theme name or Qt 6.7+ ThemeIcon.