Pyqt5 and qtwebengine
Hi!
I am trying to create a little browser. I'm basing on: https://github.com/learnpyqt/15-minu...browser_tabbed I have no experience. The problem I encountered, is that the functions imported doesn't work correctly. Context menu, doesn't work: - Save page - View source page - Reload If i try ctrl+ or ctrl-, zoom doesn't work. The problem is present also in other pyqt5 browser i downloaded online, all with same problem. Do you know if it's a bug or i must to add some additional functions? I wait clarification :) Bye Francesco bat |
So you've downloaded some software, but the functionality in it doesn't work as expected.
Start by directing your questions to that software's issue tracker: https://github.com/learnpyqt/15-minute-apps/issues |
As I've just written the problem is in many pyqt5 browsers, all with same problems.
Post a list: https://github.com/alandmoore/wcgbrowser https://github.com/karascr/Python-PyQt5-web-browser https://github.com/learnpyqt/15-minu...browser_tabbed and many others. Others are pythons code all with same problems. To contact all developers of all software is useless if the problem is other. Now i want to understand if i must add functions to code for enable the present functions contextual menu or it's useless. Bye Francesco bat |
There is a button in a piece of software that says "do X", and you've pressed that button and it does not do X, right?
* Does the documentation for the software say "X does not work unless you first add your own functions"? * Does the readme for the software say "X is a known bug/limitation"? * Have you searched the source code for X and found a stub saying "not yet implemented"? The best person to address an issue with any software is usually a developer who has worked on that software. Quote:
You don't need to go through all those projects (unless you want to), pick one or two that seem most promising. If you've tried multiple pieces of software and think an issue is on your end, include that information in the bug report and ask the developer who has written software using that code and may well have encountered the issue themselves for advice on how to verify/diagnose the issue. If you raise an issue and get no response, it's not unreasonable to ask on a forum at that point - pointing to the issue you raised - but LinuxQuestions is not a helpdesk for random GitHub projects, and doesn't have a special advantage over the developer of a piece of software, so start with the place most likely to solve the problem: raise an issue. |
If you are talking about this:
https://github.com/learnpyqt/15-minu...wser_tabbed.py https://raw.githubusercontent.com/le...wser_tabbed.py I copied that to a text editor, and added a #!/usr/bin/python to the top of it. That little browser does work. It is missing code that would allow it to open links in new tabs, change font size, turn scripts/images on/off, change the user agent etc. You'll need to add that. I can't give you a PyQt5 - QtWebengine tutorial in one page. You are going to have to stick your face in the docs for a while. https://docs.python.org/3/ https://www.riverbankcomputing.com/ https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine https://www.guru99.com/python-tutorials.html https://www.programcreek.com/python/ I can give you some basics. Change user agent. Code:
from PyQt5.QtWebEngineWidgets import QWebEngineProfile Code:
from PyQt5.QtWebEngineWidgets import QWebEngineView Code:
from PyQt5.QtGui import QFont |
Here, this is as sloppy as it gets. A bit of code I had laying around. I removed some of it, left just a functional browser. I checked it, it works. You don't need any image files. I see that the source code display doesn't work. Fix it! Font +/- works. Also caches. Shows links on hover in status bar. Has toolbar. User agent works. Probably some imports that are no longer needed.
Also here is a new tabs example for PyQt5, it works too. PyQt5-Qtwebengine Web Browser Code:
#!/usr/bin/env python Code:
#!/usr/bin/python |
Thank you very much teckk.
I am looking for these info. Now i understand i must add other functions. I thought that with the "import" was all solved but it's not so. ctrl+x ctrl+c ctrl+v works but no ctrl++ , ctrl+- and ctrl+f. My work is developing well. it's very nice but without zoom, find in the page and things so stupid but important for a browser, it can to be used only from myself. I hope to solve so i can share it :) Bye Francesco bat |
Little bit neater.
Code:
#!/usr/bin/python Code:
#!/usr/bin/python https://archlinux.org/packages/?sort...iner=&flagged= https://aur.archlinux.org/packages/?O=0&K=python |
Thank you very much.
I released it; Retroplanet Navigator: http://www.lagrottadelpipistrello.al...net/index.html Bye :) Francesco bat |
All times are GMT -5. The time now is 04:19 AM. |