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

Fix QPainter issue with Qt4 #2

Merged
merged 1 commit into from
Nov 1, 2017
Merged

Fix QPainter issue with Qt4 #2

merged 1 commit into from
Nov 1, 2017

Conversation

moleculext
Copy link
Contributor

Hello,

I've succeeded to build pinedit with Qt4 inside Qt Creator, but the QPainter behavior has changed between Qt3 and Qt4. With Qt4 the QPainter object has to be created only during paintEvent, as explained in Qt4 documentation.

That's why most of the graphic interactions were not working, like the grid, the selection and the action previews. The fix is to add extra argument QPainter for every drawing methods that are called from the View2D::paintEvent method.

This pull request also includes few compilation warning fixes.

@moleculext
Copy link
Contributor Author

Hi,
as requested in sergiomb2/pinball#5: I've managed to build pinedit under Debian Stretch inside Qt Creator with Qt4 with the modification of this pull request.
No need to add #include <stdint.h> as stated in #1.

@sergiomb2 sergiomb2 merged commit 56b56d1 into abandonware:master Nov 1, 2017
@moleculext moleculext deleted the fix_qpainter branch November 8, 2017 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants