src/eric7/Documentation/Source/eric7.SystemUtilities.QtUtilities.html

Sat, 26 Apr 2025 12:34:32 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Apr 2025 12:34:32 +0200
branch
eric7
changeset 11240
c48c615c04a3
parent 11227
023943c77c42
permissions
-rw-r--r--

MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.

<!DOCTYPE html>
<html><head>
<title>eric7.SystemUtilities.QtUtilities</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>eric7.SystemUtilities.QtUtilities</h1>
<p>
Module implementing Qt/PyQt/PySide related utility functions.
</p>

<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Classes</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Functions</h3>
<table>
<tr>
<td><a href="#checkPyside">checkPyside</a></td>
<td>Module function to check the presence of PySide.</td>
</tr>
<tr>
<td><a href="#generatePyQtToolPath">generatePyQtToolPath</a></td>
<td>Module function to generate the executable path for a PyQt tool.</td>
</tr>
<tr>
<td><a href="#generatePySideToolPath">generatePySideToolPath</a></td>
<td>Module function to generate the executable path for a PySide tool.</td>
</tr>
<tr>
<td><a href="#generateQtToolName">generateQtToolName</a></td>
<td>Module function to generate the executable name for a Qt tool like designer.</td>
</tr>
<tr>
<td><a href="#getPyQt6ModulesDirectory">getPyQt6ModulesDirectory</a></td>
<td>Function to determine the path to PyQt6 modules directory.</td>
</tr>
<tr>
<td><a href="#getPyQtToolsPath">getPyQtToolsPath</a></td>
<td>Module function to get the path of the PyQt tools.</td>
</tr>
<tr>
<td><a href="#getQtBinariesPath">getQtBinariesPath</a></td>
<td>Module function to get the path of the Qt binaries.</td>
</tr>
<tr>
<td><a href="#getQtMacBundle">getQtMacBundle</a></td>
<td>Module function to determine the correct Mac OS X bundle name for Qt tools.</td>
</tr>
<tr>
<td><a href="#hasQtDesigner">hasQtDesigner</a></td>
<td>Function to check for the availabilility of Qt-Designer tool.</td>
</tr>
<tr>
<td><a href="#hasQtLinguist">hasQtLinguist</a></td>
<td>Function to check for the availabilility of Qt-Linguist tool.</td>
</tr>
<tr>
<td><a href="#prepareQtMacBundle">prepareQtMacBundle</a></td>
<td>Module function for starting Qt tools that are Mac OS X bundles.</td>
</tr>
<tr>
<td><a href="#qVersionTuple">qVersionTuple</a></td>
<td>Module function to get the Qt version as a tuple.</td>
</tr>
</table>

<hr />
<hr />
<a NAME="checkPyside" ID="checkPyside"></a>
<h2>checkPyside</h2>
<b>checkPyside</b>(<i>variant=6</i>)
<p>
    Module function to check the presence of PySide.
</p>

<dl>

<dt><i>variant</i> (int or str)</dt>
<dd>
indicator for the PySide variant
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flags indicating the presence of PySide
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="generatePyQtToolPath" ID="generatePyQtToolPath"></a>
<h2>generatePyQtToolPath</h2>
<b>generatePyQtToolPath</b>(<i>toolname, alternatives=None</i>)
<p>
    Module function to generate the executable path for a PyQt tool.
</p>

<dl>

<dt><i>toolname</i> (str)</dt>
<dd>
base name of the tool
</dd>
<dt><i>alternatives</i> (list of str)</dt>
<dd>
list of alternative tool names to try
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
executable path name of the tool
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="generatePySideToolPath" ID="generatePySideToolPath"></a>
<h2>generatePySideToolPath</h2>
<b>generatePySideToolPath</b>(<i>toolname, variant=6</i>)
<p>
    Module function to generate the executable path for a PySide tool.
</p>

<dl>

<dt><i>toolname</i> (str)</dt>
<dd>
base name of the tool
</dd>
<dt><i>variant</i> (int or str)</dt>
<dd>
indicator for the PySide variant
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
the PySide tool path with extension
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="generateQtToolName" ID="generateQtToolName"></a>
<h2>generateQtToolName</h2>
<b>generateQtToolName</b>(<i>toolname</i>)
<p>
    Module function to generate the executable name for a Qt tool like
    designer.
</p>

<dl>

<dt><i>toolname</i> (str)</dt>
<dd>
base name of the tool
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
the Qt tool name without extension
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="getPyQt6ModulesDirectory" ID="getPyQt6ModulesDirectory"></a>
<h2>getPyQt6ModulesDirectory</h2>
<b>getPyQt6ModulesDirectory</b>(<i></i>)
<p>
    Function to determine the path to PyQt6 modules directory.
</p>

<dl>
<dt>Return:</dt>
<dd>
path to the PyQt6 modules directory
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="getPyQtToolsPath" ID="getPyQtToolsPath"></a>
<h2>getPyQtToolsPath</h2>
<b>getPyQtToolsPath</b>(<i>version=6</i>)
<p>
    Module function to get the path of the PyQt tools.
</p>

<dl>

<dt><i>version</i> (int)</dt>
<dd>
PyQt major version
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
path to the PyQt tools
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="getQtBinariesPath" ID="getQtBinariesPath"></a>
<h2>getQtBinariesPath</h2>
<b>getQtBinariesPath</b>(<i>libexec=False</i>)
<p>
    Module function to get the path of the Qt binaries.
</p>

<dl>

<dt><i>libexec</i> (bool (optional))</dt>
<dd>
flag indicating to get the path of the executable library
        (defaults to False)
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
path of the Qt binaries
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="getQtMacBundle" ID="getQtMacBundle"></a>
<h2>getQtMacBundle</h2>
<b>getQtMacBundle</b>(<i>toolname</i>)
<p>
    Module function to determine the correct Mac OS X bundle name for Qt tools.
</p>

<dl>

<dt><i>toolname</i> (str)</dt>
<dd>
plain name of the tool (e.g. "designer")
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
bundle name of the Qt tool
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="hasQtDesigner" ID="hasQtDesigner"></a>
<h2>hasQtDesigner</h2>
<b>hasQtDesigner</b>(<i></i>)
<p>
    Function to check for the availabilility of Qt-Designer tool.
</p>

<dl>
<dt>Return:</dt>
<dd>
flag indicating the availability of the Qt-Designer tool
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="hasQtLinguist" ID="hasQtLinguist"></a>
<h2>hasQtLinguist</h2>
<b>hasQtLinguist</b>(<i></i>)
<p>
    Function to check for the availabilility of Qt-Linguist tool.
</p>

<dl>
<dt>Return:</dt>
<dd>
flag indicating the availability of the Qt-Linguist tool
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="prepareQtMacBundle" ID="prepareQtMacBundle"></a>
<h2>prepareQtMacBundle</h2>
<b>prepareQtMacBundle</b>(<i>toolname, args</i>)
<p>
    Module function for starting Qt tools that are Mac OS X bundles.
</p>

<dl>

<dt><i>toolname</i> (str)</dt>
<dd>
plain name of the tool (e.g. "designer")
</dd>
<dt><i>args</i> (list of str)</dt>
<dd>
name of input file for tool, if any
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
command-name and args for QProcess
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
tuple of (str, list of str)
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="qVersionTuple" ID="qVersionTuple"></a>
<h2>qVersionTuple</h2>
<b>qVersionTuple</b>(<i></i>)
<p>
    Module function to get the Qt version as a tuple.
</p>

<dl>
<dt>Return:</dt>
<dd>
Qt version as a tuple
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
tuple of int
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial