Skip to content

Conversation

@tresf
Copy link
Member

@tresf tresf commented Jun 22, 2024

Resolves #6614.

@JohannesLorenz JohannesLorenz added this to the 1.3 milestone Aug 4, 2024
@messmerd
Copy link
Member

I successfully built LMMS with Qt 6.8.0 on Linux without the Core5Compat module.

When compiling, there were a number of deprecation warnings unrelated to that change that we should probably address in this PR.

@tresf tresf mentioned this pull request Dec 5, 2024
1 task
@tresf
Copy link
Member Author

tresf commented Feb 9, 2025

When compiling, there were a number of deprecation warnings unrelated to that change that we should probably address in this PR.

I'm wondering if we should put our efforts into fixing merge conflicts with the qt6 branch and getting it merged before the codebase diverts further? I also believe that we should have at least one automated build to ensure new features added don't cause compilation errors for future qt6 efforts.

@messmerd
Copy link
Member

messmerd commented Feb 9, 2025

@tresf I'd be fine with that.

Maybe Windows MSVC could be our Qt 6 build in the CI since it wouldn't be hard to update the dependency to Qt 6, and the MinGW build is still available in case any issues arise with it. We could do it in this PR after fixing the merge conflicts.

@tresf
Copy link
Member Author

tresf commented Feb 18, 2025

@tresf I'd be fine with that.

Maybe Windows MSVC could be our Qt 6 build in the CI since it wouldn't be hard to update the dependency to Qt 6, and the MinGW build is still available in case any issues arise with it. We could do it in this PR after fixing the merge conflicts.

Merge conflicts fixed. Some touched lines don't appear to be related to this PR I've started a conversation thread on these files, please mark as resolved if they're warranted.

The history is a bit weird (as most rebases are) and I made plenty of mistakes merging, but the branch should be in pretty good shape right now. I think it's ready for a CI job to run against Qt6 as well as a few set of eyes particularly from those that have helped with the code leading up to this point.

Please push patches directly to this branch.

@tresf tresf mentioned this pull request Feb 18, 2025
26 tasks
@tresf

This comment was marked as outdated.

@michaelgregorius

This comment was marked as off-topic.

@tresf

This comment was marked as off-topic.

@michaelgregorius

This comment was marked as off-topic.

@tresf

This comment was marked as outdated.

@michaelgregorius

This comment was marked as off-topic.

tresf and others added 12 commits February 22, 2025 19:28
Co-authored-by: michaelgregorius <[email protected]>
Co-authored-by: Rossmaxx <[email protected]>
- Fix linking issues with Qt Framework files
- Fix qmake detection
Fix implicit conversion from int when using QString.arg(...)
* Adds win32EventFilter a wrapper for nativeEventFilter on Windows
* win32EventFilter is currently used to intercept top-level Window events (currently, to avoid VSTs setting transparency of the parent application)
QComboBox activated() replaced with textActivated() since Qt 5.14
* enabled VST support for Qt 6 builds
* Note : Embedding on QT6 will be buggy on linux as a result of using qt embedding, which unfortunately is a qt bug which hasn't been resolved.
* Added lines in between bars
* Changed bar lines to follow snap size
* Changed default zoom and quantization value
* Added constants for line widths
* Added QSS configuration for new grid line colors
* Tied line widths to QSS properties
* Changed default quantization to 1/4
* Removed clear() from destructor model
* Removed destructor in ComboBoxModel.h
* Changed member set/get functions to pass by value
* Updated signal connection with newer syntax
* ensured mouse event != nullptr before deref

* separation of concerns: AFP WaveView updateCursor

extract check to pointerCloseToStartEndOrLoop()

* marked some function parameters as const
messmerd added 3 commits July 10, 2025 20:18
The Qt bug that used to be present appears to have been fixed, so the
workaround can be removed
Copy link
Member

@messmerd messmerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just making note of two places where I'm not sure why a change was made.

The rest of the changes made in this PR I have reviewed and understand.

@messmerd
Copy link
Member

This PR is functionally complete and ready for review and testing.

Testing instructions

Test the GUI on the Windows MSVC build to see if there are any regressions in how things appear or in interactions with GUI elements. If you find a bug that is also present in Windows MSVC on nightly, that's okay since it wasn't caused by this PR.

For now, only Windows MSVC is using Qt6 and rest of the builds remain on Qt5. The Qt5 builds should behave the same as before this PR unless an egregious mistake was made in the deprecation helpers or elsewhere, so a quick check of the Qt5 builds might be a good idea.

@messmerd messmerd added the needs testing This pull request needs more testing label Jul 17, 2025
@SameExpert
Copy link
Contributor

SameExpert commented Aug 16, 2025

I managed to build lmms from the latest commit of qt6 branch, 48422da, with a small modification to OpulenZ to fix compilation error, in Guix system. Projects are not opening. The project browser window opens, but after I select the project and click on open, nothing happens, just the project browser window closes as if I did not open any project.

(Edit):
With the commit 9de3f3b, of the same qt6 branch, I did not have this problem.

(Edit 2):
I also tested building with qt5, with the same commit 48422da. With qt5, I don't have this problem. Projects are loading without any problem.

@tresf
Copy link
Member Author

tresf commented Aug 17, 2025

I managed to build lmms from the latest commit of qt6 branch, 48422da, with a small modification to OpulenZ to fix compilation error, in Guix system. Projects are not opening. The project browser window opens, but after I select the project and click on open, nothing happens, just the project browser window closes as if I did not open any project.

Mind sharing the patch? PR is welcome as well!

@SameExpert
Copy link
Contributor

I managed to build lmms from the latest commit of qt6 branch, 48422da, with a small modification to OpulenZ to fix compilation error, in Guix system. Projects are not opening. The project browser window opens, but after I select the project and click on open, nothing happens, just the project browser window closes as if I did not open any project.

Mind sharing the patch? PR is welcome as well!

#8040

Conflicts:
- src/gui/clips/ClipView.cpp
- src/gui/editors/Editor.cpp
- src/gui/editors/PianoRoll.cpp
@messmerd
Copy link
Member

messmerd commented Oct 21, 2025

@SameExpert

Projects are not opening. The project browser window opens, but after I select the project and click on open, nothing happens, just the project browser window closes as if I did not open any project.

Thanks for catching this. I've fixed it in the latest commit (fbee2e7)


Another issue I noticed is a couple failed Qt assertions about sending events to objects owned by a different thread. This occurs in debug builds when I release my mouse when playing a note on the Piano Roll's piano. I'll have to look into this some more.

EDIT: It still works fine outside of debug builds. I'm guessing it's unrelated to this PR and also present in Qt 5 builds built with the debug version of the Qt libraries, though I'd have to confirm.

@tresf
Copy link
Member Author

tresf commented Oct 21, 2025

Tangentially related, @messmerd the last remaining task (besides adding this to our CI) was MSVC stuff... is that still the case or are we ok to merge into mainline now? If so, we can track any newly discovered bugs separately.

@messmerd
Copy link
Member

the last remaining task (besides adding this to our CI) was MSVC stuff... is that still the case or are we ok to merge into mainline now?

I still need to look into the changes mentioned here, and spend a little more time using it to make sure there are no other serious issues like the one SameExpert reported.

But other than that, this PR is ready to merge.

@tresf
Copy link
Member Author

tresf commented Nov 3, 2025

the last remaining task (besides adding this to our CI) was MSVC stuff... is that still the case or are we ok to merge into mainline now?

I still need to look into the changes mentioned here, and spend a little more time using it to make sure there are no other serious issues like the one SameExpert reported.

But other than that, this PR is ready to merge.

If you're comfortable, let's resolve the above convo and merge. This will provide Qt6 support to the masses right now and we can sort any minor issues as we encounter them.

One thing that we may want to consider is adding at least one Qt6 CI task to catch compilation errors, but that can be a follow-up.

@messmerd
Copy link
Member

messmerd commented Nov 3, 2025

One thing that we may want to consider is adding at least one Qt6 CI task to catch compilation errors, but that can be a follow-up.

This PR does that already - Windows MSVC is building with Qt6.

@tresf
Copy link
Member Author

tresf commented Nov 3, 2025

One thing that we may want to consider is adding at least one Qt6 CI task to catch compilation errors, but that can be a follow-up.

This PR does that already - Windows MSVC is building with Qt6.

Ooooh, it ditches Qt5. Cool. Ok, well, who pulls the trigger? 🪙 / 🪙

@Veratil Veratil merged commit 51529ce into master Nov 3, 2025
21 checks passed
@messmerd messmerd deleted the qt6 branch November 3, 2025 18:04
@JohannesLorenz JohannesLorenz mentioned this pull request Nov 7, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs testing This pull request needs more testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Qt 6 support