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

Stand-alone application #30

Closed
gokceneraslan opened this issue Apr 23, 2015 · 6 comments
Closed

Stand-alone application #30

gokceneraslan opened this issue Apr 23, 2015 · 6 comments

Comments

@gokceneraslan
Copy link

It would be nice to have a PyQt-Webkit wrapper to make it a stand-alone app:

#!/usr/bin/env python

import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *

app = QApplication(sys.argv)

web = QWebView()
web.load(QUrl("http://localhost:5000"))
web.show()

sys.exit(app.exec_())
@glamp
Copy link
Contributor

glamp commented Apr 24, 2015

Sounds cool but I know nothing about this. Where can I read more?

@gokceneraslan
Copy link
Author

For PyQt (GPL) documentation and examples, see:

http://pyqt.sourceforge.net/Docs/PyQt4/qwebview.html

and

https://github.com/pyqt/python-qt5/tree/master/PyQt5/examples/webkit

Alternatively, you can use PySide (LGPL):

https://pyside.github.io/docs/pyside/PySide/QtWebKit/index.html

These are Python-based solutions, however a simple QML-based browser would also work well:

http://doc.qt.io/qt-5/qtwebkitexamples-webkitqml-flickrview-example.html

@stonebig
Copy link
Contributor

stonebig commented May 1, 2015

Proof of concept, do on a command line

rodeo .

... rodeo starts in a browser window (firefox on windows 7 in my case)
Now, via spyder (in my use case), type and run this:

import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *

app = QApplication(sys.argv)

web = QWebView()
web.load(QUrl("http://localhost:5000"))
web.show()

sys.exit(app.exec_())

and now the unbelievable:

rodeo_under_qt4_qwebview

I'm impressed (what a shame their is a Python3 porting effort to enjoy this)

Ok, in this use-case (maybe Qt4 QtWebKit is showing its age):

  • the editor part has an issue: cursor about 6 characters on the right,
  • the click on the magnifying glass button doesn't do anything,
  • the click on the picture button open the image full screen, but I can't go back.

@stonebig
Copy link
Contributor

stonebig commented May 2, 2015

Qt5 version:

import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWebKit import *
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebKitWidgets import QWebPage, QWebView

app = QApplication(sys.argv)

web = QWebView()
web.load(QUrl("http://localhost:5000"))
web.show()

sys.exit(app.exec_())

In this use-case (Qt5 Webkit only, as QtWebEngine is not compilable with vs2010):

  • the editor part has no issue,
  • the click on the magnifying glass button doesn't do anything,
  • the click on the picture button doesn't open the image full screen.

@glamp glamp closed this as completed Nov 7, 2015
@glamp
Copy link
Contributor

glamp commented Nov 7, 2015

see 1.0

@gokceneraslan
Copy link
Author

👍

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

No branches or pull requests

3 participants