PythonQt.QtCore.QMimeType
QMimeType
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
For instance a file named "readme.txt" has the MIME type "text/plain". The MIME type can be determined from the file name, or from the file contents, or from both. MIME type determination can also be done on buffers of data not coming from files.
Determining the MIME type of a file can be useful to make sure your application supports it. It is also useful in file-manager-like applications or widgets, in order to display an appropriate icon for the file, or even the descriptive comment in detailed views.
To check if a file has the expected MIME type, you should use inherits() rather than a simple string comparison based on the name(). This is because MIME types can inherit from each other: for instance a C source file is a specific type of plain text file, so text/x-csrc inherits text/plain.
Source: https://doc.qt.io/archives/qt-5.15/qmimetype.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
aliases |
function | (self) -> tuple |
X.aliases() -> tuple |
allAncestors |
function | (self) -> tuple |
X.allAncestors() -> tuple |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
comment |
function | (self) -> str |
X.comment() -> str |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
filterString |
function | (self) -> str |
X.filterString() -> str |
genericIconName |
function | (self) -> str |
X.genericIconName() -> str |
globPatterns |
function | (self) -> tuple |
X.globPatterns() -> tuple |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
iconName |
function | (self) -> str |
X.iconName() -> str |
inherits |
function | (self, *args: Any, **kwargs: Any) -> bool |
Returns if the class inherits or is of given type name |
isDefault |
function | (self) -> bool |
X.isDefault() -> bool |
isValid |
function | (self) -> bool |
X.isValid() -> bool |
name |
function | (self) -> str |
X.name() -> str |
operator_assign |
function | (self, other: Any) -> Any |
X.operator_assign(other) -> PythonQt.QtCore.QMimeType |
parentMimeTypes |
function | (self) -> tuple |
X.parentMimeTypes() -> tuple |
preferredSuffix |
function | (self) -> str |
X.preferredSuffix() -> str |
suffixes |
function | (self) -> tuple |
X.suffixes() -> tuple |
swap |
function | (self, other: Any) -> None |
Swaps [QMimeType](https://doc.qt.io/archives/qt-5.15/qmimetype.html) other with this [QMimeType](https://doc.qt.io/archives/qt-5.15/qmimetype.html) object. |