cztomczak / cefpython

Python bindings for the Chromium Embedded Framework (CEF)
Other
3.03k stars 469 forks source link

qt.py example has display issues on windows machines #630

Open feenes opened 2 years ago

feenes commented 2 years ago

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

This all seems good, but then.

tested with

Is this issue known? Is there a fix?

The problem does not seem to occur on:

Thus (with the tests, that I made so far) it seems to be an OS related issue

cztomczak commented 2 years ago

Are you having DPI issues? See this comment: https://github.com/cztomczak/cefpython/issues/530#issuecomment-505066492

feenes commented 2 years ago

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

cztomczak commented 2 years ago

Yeah, we could add some comments in code and add info to KnowledgeBase document as well.

feenes commented 2 years ago

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?

cztomczak commented 2 years ago

I don't think you can detect issue programmatically.