PythonQt.QtCore.QLibrary · declarations 001
Back to PythonQt.QtCore.QLibrary
DeepBindHint
instance-attribute
DeepBindHint: Any
ExportExternalSymbolsHint
instance-attribute
ExportExternalSymbolsHint: Any
LoadArchiveMemberHint
instance-attribute
LoadArchiveMemberHint: Any
LoadHint
instance-attribute
LoadHint: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
LoadHints
instance-attribute
LoadHints: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
PreventUnloadHint
instance-attribute
PreventUnloadHint: Any
ResolveAllSymbolsHint
instance-attribute
ResolveAllSymbolsHint: Any
destroyed
destroyed(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtCore.QLibrary.destroyed; argument details are not documented.
errorString
errorString() -> str
X.errorString() -> str
Supplemental documentation: Qt 5 reference:
QString QLibrary::errorString() const
Returns a text string with the description of the last error that occurred. Currently, errorString will only be set if load(), unload() or resolve() for some reason fails.
This function was introduced in Qt 4.2.
Source: https://doc.qt.io/archives/qt-5.15/qlibrary.html#errorString
fileName
instance-attribute
fileName: Any
Qt 5 reference:
fileName : QString
This property holds the file name of the library
We recommend omitting the file's suffix in the file name, since QLibrary will automatically look for the file with the appropriate suffix (see isLibrary()).
When loading the library, QLibrary
searches in all system-specific library locations (for example, LD_LIBRARY_PATH on
Unix), unless the file name has an absolute path. After loading the library
successfully, fileName() returns the fully-qualified file name of the library, including
the full path to the library if one was given in the constructor or passed to
setFileName().
For example, after successfully loading the "GL" library on Unix platforms, fileName() will return "libGL.so". If the file name was originally passed as "/usr/lib/libGL", fileName() will return "/usr/lib/libGL.so".
Access functions:
| QString | fileName() const |
|---|---|
| void | setFileName(const QString \&fileName) |
Source: https://doc.qt.io/archives/qt-5.15/qlibrary.html#fileName
isLibrary
isLibrary(fileName: Any) -> bool
X.isLibrary(fileName) -> bool
Supplemental documentation: Qt 5 reference:
[static] bool QLibrary::isLibrary(const QString \&fileName)
Returns true if fileName has a valid suffix for a loadable library; otherwise
returns false.
| Platform | Valid suffixes |
|---|---|
| Windows | .dll, .DLL |
| Unix/Linux | .so |
| AIX | .a |
| HP-UX | .sl, .so (HP-UXi) |
| macOS and iOS | .dylib, .bundle, .so |
Trailing versioning numbers on Unix are ignored.
Source: https://doc.qt.io/archives/qt-5.15/qlibrary.html#isLibrary
isLoaded
isLoaded() -> bool
X.isLoaded() -> bool
Supplemental documentation: Qt 5 reference:
bool QLibrary::isLoaded() const
Returns true if the library is loaded; otherwise returns false.
See also load().
Source: https://doc.qt.io/archives/qt-5.15/qlibrary.html#isLoaded
load
load() -> bool
X.load() -> bool
Supplemental documentation: Qt 5 reference:
bool QLibrary::load()
Loads the library and returns true if the library was loaded successfully; otherwise
returns false. Since
resolve() always calls this
function before resolving any symbols it is not necessary to call it explicitly. In some
situations you might want the library loaded in advance, in which case you would use
this function.
See also unload().
Source: https://doc.qt.io/archives/qt-5.15/qlibrary.html#load
loadHints
instance-attribute
loadHints: Any
Qt 5 reference:
loadHints : LoadHints
Give the load() function some hints on how it should behave.
You can give some hints on how the symbols are resolved. Usually, the symbols are not resolved at load time, but resolved lazily, (that is, when resolve() is called). If you set the loadHints to ResolveAllSymbolsHint, then all symbols will be resolved at load time if the platform supports it.
Setting ExportExternalSymbolsHint will make the external symbols in the library available for resolution in subsequent loaded libraries.
If
LoadArchiveMemberHint
is set, the file name is composed of two components: A path which is a reference to an
archive file followed by the second component which is the reference to the archive
member. For instance, the
fileName
libGL.a(shr_64.o) will refer to the library shr_64.o in the archive file named
libGL.a. This is only supported on the AIX platform.
The interpretation of the load hints is platform dependent, and if you use it you are probably making some assumptions on which platform you are compiling for, so use them only if you understand the consequences of them.
By default, none of these flags are set, so libraries will be loaded with lazy symbol resolution, and will not export external symbols for resolution in other dynamically-loaded libraries.
Note: Setting this property after the library has been loaded has no effect and loadHints() will not reflect those changes.
Note: This property is shared among all QLibrary instances that refer to the same library.
Access functions:
| QLibrary::LoadHints | loadHints() const |
|---|---|
| void | setLoadHints(QLibrary::LoadHints hints) |
Source: https://doc.qt.io/archives/qt-5.15/qlibrary.html#loadHints
objectNameChanged
objectNameChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtCore.QLibrary.objectNameChanged; argument details are not documented.
setFileName
setFileName(fileName: Any) -> Any
X.setFileName(fileName)
setFileNameAndVersion
setFileNameAndVersion(fileName: Any, version: Any) -> Any
X.setFileNameAndVersion(fileName, version)
Supplemental documentation: Qt 5 reference:
void QLibrary::setFileNameAndVersion(const QString \&fileName, int versionNumber)
Sets the fileName property and major version number to fileName and versionNumber respectively. The versionNumber is ignored on Windows.
See also setFileName().
void QLibrary::setFileNameAndVersion(const QString \&fileName, const QString \&version)
Sets the fileName property and full version number to fileName and version respectively. The version parameter is ignored on Windows.
This function was introduced in Qt 4.4.
See also setFileName().
Source: https://doc.qt.io/archives/qt-5.15/qlibrary.html#setFileNameAndVersion
setLoadHints
setLoadHints(hints: Any) -> Any
X.setLoadHints(hints)
unload
unload() -> bool
X.unload() -> bool
Supplemental documentation: Qt 5 reference:
bool QLibrary::unload()
Unloads the library and returns true if the library could be unloaded; otherwise
returns false.
This happens automatically on application termination, so you shouldn't normally need to call this function.
If other instances of QLibrary are using the same library, the call will fail, and unloading will only happen when every instance has called unload().
Note that on Mac OS X 10.3 (Panther), dynamic libraries cannot be unloaded.
See also resolve() and load().
Source: https://doc.qt.io/archives/qt-5.15/qlibrary.html#unload