-
Notifications
You must be signed in to change notification settings - Fork 84
Adding Qt multimedia component #80
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
Conversation
This might be an okay workaround for your build, but it make more sense to configure the generator to include the needed code rather than editing the As an aside, we don't build and run the generator during the CTK build process but realistically we should have been doing that all along rather than relying on the pre-generated ones (the generator is pretty quick to build and run). |
Ok I understand. However, I don't get how the generator creates PythonQt_QtBindinds.cpp. Could you point me to the right direction ? |
I've never edited that part of the code myself, but I would think it's very similar to what you've done in the cmakelists to make sure that the multimedia parts are included in the generated code. I guess you would start by building and running the generator and looking to see what configuration options it has. |
There is something odd: the CMakeLists of the generator doesn't seem to have ever supported Qt5, and yet there are pre-generated wrappers for Qt5 and commits related to Qt5 support... So how were all these "generated_cpp_5x" generated ? |
Your new PR looks much better 👍
Not sure - probably we should ask @florianlink at the upstream repo |
Yes, please submit the pull request to upstream. We always get changes in upstream repository first and then update our fork. Before submitting, though, try to get rid of the MultimediaWidgets injections at those few places. I think there is already a mechanism for bundling (module)Widgets with (module). See for example how QuickWidgets are declared as a dependency of Quick:
So, instead of adding MultimediaWidgets, try to do the same as for QuickWidgets. If it does not work then you can submit the PR to upstream as is, and ask advice from Florian. |
I don't think these generated_cpp_* folders in the build tree are used on Windows and Linux. The 5_11 wrapper is generated in my build tree at @pieper do you have the freshly generated wrapper in your build tree, on macOS too? If everything works for our use case without touching the generated_cpp* folders then we may not need to update them in the pull request (and maybe ask Florian in the PR to confirm that this is the right thing to do). |
That's great - it definitely makes sense to build and run the generator rather, but I had thought we weren't doing that, at least when PythonQt was first integrated.
I don't have access to a mac build at the moment but I would be pretty sure it's the same. |
I'd like to, but their pythonqt doesn't have a cmakelists like in CTK so my modifications are irrelevant then. Rather, there is a batch script to generate a solution from Qt project files. Once I generated and compiled the solution, I didn't get a generated wrapper, but the executable for the generator is there (generator/release/pythonqt_generator.exe). However, when I launch it there is an error:
Moreover, their wrappers don't seem to include a PythonQt_QtBindings.cpp like in CTK. In any case, I find it really confusing to have pre-generated wrappers if those are not copied in the build. This increases the risk of discrepancy between the pre-generated wrappers and the one built during compilation. |
Indeed, it's better and it works (see above commit) |
I had tried generating the wrapper from the upstream repo, but that triggered an error with Qt5.15 as mentioned above. |
@lassoan Considering the findings detailed in my last post, do you think my PR could be approved and merged ? (along side the complementary one in CTK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Please squash the commits so that we can merge.
48bbad3
to
e95b1da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
@jcfr could you please review and merge this? I don't have write access and I'm not sure how you want to manage patches. This patch seems to affect the CMake build system, which does not exist upstream, so I guess we can just commit it directly here (don't need to push it upstream and backport). |
As I wrote above, it looks good to me, but only @jcfr can merge. |
@atracsys-sbt Thanks for the contribution 🙏 and everyone else for the reviews 💯 |
@atracsys-sbt Could you submit another pull-request documenting your contribution in the main README ? See https://github.com/commontk/PythonQt#patched-9 |
Thank you @jcfr for the review and merge. @atracsys-sbt thanks again for your contribution and your patience in waiting out all the reviews. |
|
- uses GCC docker images to build with gcc 7, 9 and 11 - uses Python 3.7.3 / Qt 5.11.3 (gcc 7/9), Python 3.9.2 / Qt 5.15.2 (gcc 11)
The Qt multimedia wrapper was already implemented but not included in the CMakeLists, neither was its dependency on MultimediaWidgets, so I added those.