# eric7.SystemUtilities.QtUtilities

Module implementing Qt/PyQt/PySide related utility functions.

### Global Attributes

None

### Classes

None

### Functions

checkPyside | Module function to check the presence of PySide2/PySide6.
generatePyQtToolPath | Module function to generate the executable path for a PyQt tool.
generatePySideToolPath | Module function to generate the executable path for a PySide2/PySide6 tool.
generateQtToolName | Module function to generate the executable name for a Qt tool like designer.
getPyQt6ModulesDirectory | Function to determine the path to PyQt6 modules directory.
getPyQtToolsPath | Module function to get the path of the PyQt tools.
getQtBinariesPath | Module function to get the path of the Qt binaries.
getQtMacBundle | Module function to determine the correct Mac OS X bundle name for Qt tools.
prepareQtMacBundle | Module function for starting Qt tools that are Mac OS X bundles.
qVersionTuple | Module function to get the Qt version as a tuple.

## checkPyside

checkPyside(variant=2)

Module function to check the presence of PySide2/PySide6.

variant (int or str)
  indicator for the PySide variant

Return:
  flags indicating the presence of PySide2/PySide6

Return Type:
  bool

Up

## generatePyQtToolPath

generatePyQtToolPath(toolname, alternatives=None)

Module function to generate the executable path for a PyQt tool.

toolname (str)
  base name of the tool
alternatives (list of str)
  list of alternative tool names to try

Return:
  executable path name of the tool

Return Type:
  str

Up

## generatePySideToolPath

generatePySideToolPath(toolname, variant=2)

Module function to generate the executable path for a PySide2/PySide6 tool.

toolname (str)
  base name of the tool
variant (int or str)
  indicator for the PySide variant

Return:
  the PySide2/PySide6 tool path with extension

Return Type:
  str

Up

## generateQtToolName

generateQtToolName(toolname)

Module function to generate the executable name for a Qt tool like designer.

toolname
  base name of the tool (string)

Return:
  the Qt tool name without extension (string)

Up

## getPyQt6ModulesDirectory

getPyQt6ModulesDirectory()

Function to determine the path to PyQt6 modules directory.

Return:
  path to the PyQt6 modules directory

Return Type:
  str

Up

## getPyQtToolsPath

getPyQtToolsPath(version=5)

Module function to get the path of the PyQt tools.

version (int)
  PyQt major version

Return:
  path to the PyQt tools

Return Type:
  str

Up

## getQtBinariesPath

getQtBinariesPath(libexec=False)

Module function to get the path of the Qt binaries.

libexec (bool (optional))
  flag indicating to get the path of the executable library (defaults to False)

Return:
  path of the Qt binaries

Return Type:
  str

Up

## getQtMacBundle

getQtMacBundle(toolname)

Module function to determine the correct Mac OS X bundle name for Qt tools.

toolname
  plain name of the tool (e.g. "designer") (string)

Return:
  bundle name of the Qt tool (string)

Up

## prepareQtMacBundle

prepareQtMacBundle(toolname, args)

Module function for starting Qt tools that are Mac OS X bundles.

toolname (str)
  plain name of the tool (e.g. "designer")
args (list of str)
  name of input file for tool, if any

Return:
  command-name and args for QProcess

Return Type:
  tuple of (str, list of str)

Up

## qVersionTuple

qVersionTuple()

Module function to get the Qt version as a tuple.

Return:
  Qt version as a tuple

Return Type:
  tuple of int

Up