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

WIP: Migrate to PySide6 / Qt6 #176

Closed
wants to merge 19 commits into from
Closed

WIP: Migrate to PySide6 / Qt6 #176

wants to merge 19 commits into from

Conversation

daringer
Copy link
Collaborator

@daringer daringer commented Dec 1, 2023

Migrates Qt5 directly to PySide6/Qt6 and replaces pre-compiled ui/resource files with it's runtime equivalents.

can be tested

todos:

  • windows tests
  • format/typing
  • squash
  • layout details

done:

  • renamed imports from PyQt5 to PySide6
  • renamed all pyqtSignal/pyqtSlot to the new names Signal/Slot
  • removed any remaining .ui + resource management, directly loading all from file during runtime now
  • various fixes for ui-loading in combination with deriving from Q*-stuff (i.e., widgets now auto-resizing as intended)
  • removed recursion as Qt doesn't like its .connect method overwritten
  • (all??) the needed enum renames are done using this script
  • random-walk tests on linux from repository/source only

fixes #93, fixes #63, fixes #163

@mmerklinger
Copy link
Collaborator

We also need to test the builds manually for all platforms and make sure the build environments in the pipelines have all necessary dependencies. Though I would suggest to first fix the functional problems and then move on to deployment.

@mmerklinger
Copy link
Collaborator

Can we maybe also move to only using UI files as of #63 with this change?

@daringer
Copy link
Collaborator Author

daringer commented Dec 1, 2023

clearly the right PR to do such a change, will look into it mostly(?) done, see top post

@daringer daringer force-pushed the pyqt6 branch 3 times, most recently from e6f7c2d to 0c02f61 Compare December 7, 2023 01:32
@jj-so
Copy link
Contributor

jj-so commented Dec 8, 2023

  • the logo above "Please insert your Nirokey" is not centered.
  • the popup for "add new credential" does not open in the center of the app

@mmerklinger
Copy link
Collaborator

Linux

pyinstaller - onefile

  • Nitrokey-Logo on the top left missing
  • Icons on the bottom left for Home and Help missing
  • On the Homepage the big Nitrokey logo in the middle is missing
  • The Nitrokey icon in front of a connected Nitrokey works
  • On the password tab the lock/unlock icon in the list works
  • On the add password window the CANCEL an OK buttons work

pyinstaller - onedir

  • If executed from within the directory the icons work, if from different directory they do not
  • The Nitrokey icon on the top left is not centered

@mmerklinger
Copy link
Collaborator

Windows

pyinstaller - onefile

  • Nitrokey-Logo on the top left missing
  • Icons on the bottom left for Home and Help missing
  • On the Homepage the big Nitrokey logo in the middle is missing
  • The Nitrokey icon in front of a connected Nitrokey works
  • On the overview tab the lock/unlock icon in the list works
  • On the password window the CANCEL an OK button missing (maybe usually not shown on Windows?)

pyinstaller - onedir

  • If executed from within the directory the icons work, if from different directory they do not
  • The Nitrokey icon on the top left is centered, but the button for the connected Nitrokey is very closely under it

* various cleanups for icons and ui-widgets
* remove old 'about_dialog.py' and its '.ui'
* no need to compile resources anymore, now filepaths are used directly
* no need to compile '.ui' files to '.py' anymore, QUiLoader takes care
  during runtime
* introduce new `load_ui()` that properly injects into current instance
* automated resizing of inner widgets works again
* rename evil 'widget' to 'line_widget' inside `secrets_tab.ui`
remember - don't try to overwrite Qt's `.connect` method!
@daringer
Copy link
Collaborator Author

closing in favor of: #187

@daringer daringer closed this Dec 18, 2023
@mmerklinger mmerklinger deleted the pyqt6 branch December 20, 2023 10: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.

Move to Qt6 .ui to .py file conversion problem
3 participants