Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

Cross-Qt compatibility module for IDAPython.

What is it?

Cute is a tiny compatibility module, to allow IDAPython code to use PySide/Qt4 and PyQt/Qt5 seamlessly.

Motivation

Cute was originally a part of Sark (sark.qt). Since no-one likes dependencies, especially for things this small, no-one used it. So I decided to release it as a separate module as well, so that people can just take the file as-is and use it in their own code.

Usage

Qt Modules

Importing QtCore, QtGui and QtWidgets works for all Qt versions. For Qt4, QtWidgets is an alias for QtGui, so Qt5 code with QtWidgets / QtGui separation will work on Qt4 as well.

from cute import QtCure, QtGui, QtWidgets

Connecting to Signals

Cute offers a cute.connect(...) method to mitigate the difference between Qt4 and Qt5.

# Qt4 Code:
QtCore.QObject.connect(my_object, QtCore.SIGNAL('error(QProcess::ProcessError)'), my_callback)

# Qt5 Code:
my_object.error.connect(my_callback)

# Cute Code:
cute.connect(my_object, 'error(QProcess::ProcessError)', my_callback)

The API for disconnecting is the same, just use the cute.disconnect(...) function.

Form to Widget

IDA has 2 APIs for getting the widget associated with a TForm. One for PyQt and one for PySide. Cute wraps them both in one function.

my_widget = cute.form_to_widget(my_tform)

Which Qt Should I Use?

Sometimes, you do need to to know the Qt version your code uses. For those cases, ask the use_qt5 variable.

if cute.use_qt5:
    print 'Use Qt5'
else:
    print 'Use Qt4'

In a Project

There are two recommended ways to use Cute:

  1. Copy it into your own project. This way does create code duplication, but avoid dependencies.

  2. Install it as a package - pip install idacute.

Licensing

Cute is released under the MIT license, so you are free to use it in any project whatsoever.

FAQ

Q: Why did you name it “cute”?

A: For years I was sure “Qt” is pronounced “Q T”. This is my effort to remind myself it is not.

Metadata

Release files for idacute 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Built distributions (wheels)

Table of built distributions (wheels) for idacute 1.0.1
File Interpreter ABI Platform
idacute-1.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details
idacute-1.0.1-py2-none-any.whl Python 2 none any Details

Total release size: 13.3 kB

Release files / idacute-1.0.1-py2.py3-none-any.whl

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL idacute-1.0.1-py2.py3-none-any.whl
Size 5.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8a8d7dbc3d345616db4616145d22f0dccdb0976c74a5cb4faabf7a5e446d2957
BLAKE2b-256 checksum
How to use checksums
4830b9fd9c14694aed8923563c5cda9b3526baf0b1f2d06b49151185d9c923c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / idacute-1.0.1-py2-none-any.whl

Download URL idacute-1.0.1-py2-none-any.whl
Size 7.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
c70c168ab127a69bd4d6d507bb565eaad14ed645e7de361980438c1150515b95
BLAKE2b-256 checksum
How to use checksums
3795479358e5d98e5bdad5a24788acd08c2d7d53b66e77cc40e5dcbed6954f80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page