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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PyQtEnumConverter-1.0.tar.gz
.
File metadata
- Download URL: PyQtEnumConverter-1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0697da5d18ee20c7e38905dfc3129702ac9c54de520e2a26d92e5fa028fc21d1 |
|
MD5 | 1fa8bb373d7e076ee83e2ba7a2a313e7 |
|
BLAKE2b-256 | 96c578d3f66962610e83069195ef502a508ee26ba8f7bd8bfdcb8cb7b1859ab9 |
File details
Details for the file PyQtEnumConverter-1.0-py3-none-any.whl
.
File metadata
- Download URL: PyQtEnumConverter-1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65c3cdc9de2f1caf4e976209d8da47e85bb87ecaa7f2b6c8a553ebaed93b977f |
|
MD5 | 217b690d01a37c6c45d5cbf9b3c67e91 |
|
BLAKE2b-256 | 92824b55a60525b4f5c369f63a50fa36659ec892c9914aa107d48b1c994dbf51 |