Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt 6 Transition Guide - new replacement #416

Open
Nixellion opened this issue Jun 17, 2024 · 1 comment
Open

Qt 6 Transition Guide - new replacement #416

Nixellion opened this issue Jun 17, 2024 · 1 comment

Comments

@Nixellion
Copy link

Found another thing that changed:

QPalette.Background was long obsolete, but now using it causes an error, has to be replaced with QPalette.ColorRole.Window. And all calls to QPallete.X should go to QPalette.ColorRole.

At least in my code specifically I had this:

palette = QtGui.QPalette(self.palette())
palette.setColor(palette.Background QtCore.Qt.transparent)

And it was breaking the code and showing an error.

Replacing it with:

palette = QtGui.QPalette(self.palette())
palette.setColor(palette.ColorRole.Window, QtCore.Qt.transparent)

Fixed the problem.

@mottosso
Copy link
Owner

Thanks for this, any chance you can put this in the README towards the bottom with the other transition notes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants