-
Notifications
You must be signed in to change notification settings - Fork 14
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
Upgrade to PySide6 #1476
Merged
Upgrade to PySide6 #1476
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psavery
force-pushed
the
pyside6
branch
3 times, most recently
from
October 13, 2023 17:31
db0d698
to
2551ca3
Compare
Closed
This was done via this command: ```bash find . -name "*.py" | xargs sed -i 's/PySide2/PySide6/g' ``` This takes care of most changes needed. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This is different in PySide6 Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
It is installing pyside2, and having pyside2 and pyside6 at the same time can cause compatibility issues. Now, the period table will not work, but we can try to fix it later. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
PySide6 needs it. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
The regular `matplotlib` package brings in qt5 dependencies which we want to avoid. Using `matplotlib-base` skips the qt dependencies and will use what we already have (pyside6). Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
The "silx-base" does not install any other dependencies, which is great for us. That means we can use PySide6 with silx and not install Qt5. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
I don't know why this is an issue, but these changes appear to fix it. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
I think this works better... for some reason, we need to accept the progress as part of the QueuedConnection for PySide6. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
PySide6 requires us to do this. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Need to do this for PySide6 for some reason. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
The following warning was appearing: ``` QAbstractItemView::commitData called with an editor that does not belong to this view ``` It looks like the modified functions were getting called with a checkbox before it belonged to the view. To fix it, we now only commit the data on user interaction (the `clicked` signal instead of the `toggled` signal). Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This was just a request made by LLNL. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
It appears that PySide6 saves and loads QSettings a little differently than PySide2. When we load QSettings into PySide6 that were generated in PySide2, lists that are nested in dicts become lists of lists instead of flat lists. There may be some other differences too. Rather than trying to figure out how to patch the QSettings, let's just make a new version of QSettings. This means that when users upgrade to the PySide6 version, they will lose their settings, but that is okay... This doesn't affect state files at all, which do not use QSettings but a different mechanism for storing state. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
The panel buffer should not be applied when pre-processing images, only after import is complete and images are re-loaded. Signed-off-by: Brianna Major <brianna.major@kitware.com>
Otherwise, it goes to the back of the application. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This fixes an error that was occurring. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
We don't need to reject because `self.remove_lines()` is already called. And rejecting is causing an issue due to a bug in Qt (reported [here](https://bugreports.qt.io/browse/PYSIDE-2490)). This issue is new to PySide6. We might run into it elsewhere. But let's hope that Qt fixes the issue soon. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Qt is deprecating "exec_" in favor of "exec", so let's go ahead and switch that over. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
It is nicer to have a window title than just "hexrd". Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
We were planning on doing this for a while anyways. Since we are making major changes, we might as well keep on going! Fixes: #1145 Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
The save images dialog used to use the working directory as the default location. This may not be in sync (like after loading a state file) and may not be a good starting point. Instead use the most recent images directory. If that path does not exist or is invalid default to the current working directory. Signed-off-by: Brianna Major <brianna.major@kitware.com>
I'm not sure if we are repeatedly connecting anywhere (I don't immediately see that), but just in case we are, make sure that previous connections are removed before new connections are made. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
We are removing the namespace package support to simplify things. Now, all HEXRDGUI code will lie under `hexrdgui` instead of `hexrd.ui`. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
It keeps on causing issues, so let's just disable it for now. We can enable it as long as we are sure that this issue will not happen again: #1556 Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
bnmajor
approved these changes
Oct 19, 2023
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.
Looking good!! 🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR also upgrades our Python version to Python3.11, renames
hexrd.ui
tohexrdgui
, and addsosx-arm64
packages. So a lot of major changes.Fixes: #1145
Fixes: #1338
Fixes: #1351
Fixes: #1467
Fixes: #1556
Fixes: #1589