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

basic PySide2 support in examples/qt.py #438 #490

Merged
merged 1 commit into from
Nov 14, 2018

Conversation

donalm
Copy link
Contributor

@donalm donalm commented Nov 11, 2018

Just the basics to make the qt.py example work with PySide2.

"Works for me" on Linux and MacOS - some details are below.

Linux & Conda Python 2:
[qt.py] CEF Python 66.0
[qt.py] Python 2.7.15 64bit
[qt.py] PySide2 5.6.0~a1 (qt 5.6.2)

Linux & Conda Python 3:
[qt.py] CEF Python 66.0
[qt.py] Python 3.6.6 64bit
[qt.py] PySide2 5.6.0~a1 (qt 5.6.2)

MacOS & Python 3:
[qt.py] CEF Python 66.0
[qt.py] Python 3.6.6 64bit
[qt.py] PySide2 5.6.0~a1 (qt 5.6.2)

Linux is CentOS 7:
Linux centos 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

MacOS is High Sierra:
Darwin Hox.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

Copy link
Owner

@cztomczak cztomczak left a comment

Choose a reason for hiding this comment

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

Thanks. It works, but changes are required before it can be merged. See review comments.

I have tested on Windows with Python 3.6 and it works fine. PySide2 is not available to install from PyPi with Python 2.7.

I couldn't test on Mac, because currently my Mac runs on MacOS 10.9 and the wheel package from PyPi supports only Mac 10.10 or later. I will be upgrading MacOS in the near future so I will test it then.

@@ -22,6 +22,7 @@
PYQT4 = False
PYQT5 = False
PYSIDE = False
PYSIDE2 = False
Copy link
Owner

Choose a reason for hiding this comment

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

Navigation bar icons don't work, see screenshot:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't able to reproduce this - the buttons appear normally and work correctly in:
CentOS7
Ubuntu 18.10
Kubuntu 18.04
macOS High Sierra
I tested with py2 and py3 and pyqt5 and pyside2 on all the above. All the Python and PySide/PyQt stuff was from miniconda.

I also tested with PySide2 from apt on Ubuntu 18.10 with no button issues.

(I did see sporadic #284 type problems on all these platforms).

Can you please tell me more about your environment?

@@ -22,6 +22,7 @@
PYQT4 = False
PYQT5 = False
PYSIDE = False
PYSIDE2 = False

Copy link
Owner

Choose a reason for hiding this comment

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

Please add a new line to the "Tested configurations" section at the top of the file.

@cztomczak cztomczak merged commit a9a30ae into cztomczak:master Nov 14, 2018
@cztomczak
Copy link
Owner

Thanks for testing.

I didn't see any focus issues. In most of the examples focus issues can be resolved by making some additional calls. It depends on GUI framework. Focus issues can also be resolved on Linux by applying a few patches to CEF, see this comment: https://bitbucket.org/chromiumembedded/cef/issues/2026/multiple-major-keyboard-focus-issues-on#comment-42770322

The issue with icons was caused because I was missing the resources directory.

@cztomczak
Copy link
Owner

Thanks. Merged and updated example to add tested configurations comment.

@cztomczak
Copy link
Owner

@donalm Is there a "grab_focus" event or an equivalent in Qt? If so try calling Browser.SendFocusEvent(True) in there. See tiliado/cef@b1d9e48#commitcomment-27005338

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