Skip to main content

Converts enums from PyQt5 to PyQt6

Project description

PyQtEnumConverter

PyQt6 changes the usage of enums. Here are some examples:

#PyQt5
QLayout.SetFixedSize
#PyQt6
QLayout.SizeConstraint.SetFixedSize

#PyQt5
Qt.IgnoreAspectRatio
#PyQt6
Qt.AspectRatioMode.IgnoreAspectRatio

To change all of this is a lot of work when you port a big project from PyQt5 to PyQt6. To help porting I had written this little script that does the work for you. It works with files and directories, which are parsed recursive.

Usage: PyQtEnumConverter <file/directory>

This is a little script that I had written in a few hours. It may not work perfect and there's no warranty that it will not damage your project. It uses simple text replacement, so as imports are not supported. Please make a backup of your project before using it.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyQtEnumConverter-1.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

PyQtEnumConverter-1.0-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page