cefpython
cefpython copied to clipboard
qt.py example has display issues on windows machines
I'd like to integrate a cefpython3 window into an existing qt application and in order to get started I tried the qt.py example. ( https://github.com/cztomczak/cefpython/blob/master/examples/qt.py ) ( Latest commit 181588c on Jan 22, 2020 )
So far I have the impression, that the example does not work properly on windows PCs
- The application starts
- a window with the title pqtXXX example shows up
- adress bar shows up with three gray buttons and https://www.google.com as url location
- the contents of google (request to confirm / modify cookie settings) shows up
This all seems good, but then.
- the same contents shows up a second time in the window, but this time with reduced size
- using the scroll bar the 'small contents can be scrolled away'
- as soon as I mouse_over a button the 'small windows shows up again'
tested with
- windows 10 python3.6.3-64 and pyqt4
- windows 10 python 3.6.3-64 and pyqt5
- windows 10 python 2.7.18-64 and pyqt4
- windows 10 python 2.7.18-64 and pyside
Is this issue known? Is there a fix?
The problem does not seem to occur on:
- linux 2.7.12 64 pyside
- linux 3.6.14 pyside2
- linux 3.6.14 pyqt5
Thus (with the tests, that I made so far) it seems to be an OS related issue
Are you having DPI issues? See this comment: https://github.com/cztomczak/cefpython/issues/530#issuecomment-505066492
Yes indeed. this is the issue. Thank you very much
I will try embedding params in the manifest lateron
For the time being I just set scaling to 100% and the problem disappeared.
I wonder whether there is any way to make it easier to understand that issue when it is encountered.
Would there be any way, that the sample code detects that issue?
Or if not perhaps just add a print statement to qt.py
, that says to look at https://github.com/cztomczak/cefpython/issues/530#issuecomment-505066492 if there's anything strange with the display sizes?
I guess I'm not the only one encountering this issue and being quite confused and anything, that helps to pinpoint the issue faster could be great
Yeah, we could add some comments in code and add info to KnowledgeBase document as well.
What would be best, but I'm not sure this is technically feasible, would be to detect the inconsistency between dpi and window size and report it.
Thanks a again.
Shall I close the issue?
I don't think you can detect issue programmatically.