Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. HTML Editor works in major browsers, but not in QtWebKit
QtWS25 Last Chance

HTML Editor works in major browsers, but not in QtWebKit

Scheduled Pinned Locked Moved Qt WebKit
1 Posts 1 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pezzi
    wrote on last edited by
    #1

    Hi Everyone,

    we are trying to embed the JavaScript based WYSIWIG HTML editor CKEditor ("CKEditor":http://ckeditor.com/) into our PySide/Qt/Python application.

    We are seeing an issue that does not occur when we are running the JavaScript code directly in Chrome et al:

    When selecting a stretch of text (even a single word), and then changing its style to bold, italics or underline, the operation completes correctly, but after that, several apparently random fragments of the text around it are selected.

    If you install Python 2.7 and a recent PySide), the minimal code below reproduces the issue.
    Just selecting part of the text and "BOLD"-ing it will randomly select other parts of the text.

    Here is the sample code to reproduce ...

    @
    from PySide import QtGui, QtCore
    import PySide.QtWebKit
    import sys

    class HTMLEditor(QtGui.QWidget):
    def init(self, parent = None):
    super(HTMLEditor, self).init(parent)
    view = PySide.QtWebKit.QWebView(parent)
    view.load(QtCore.QUrl("http://ckeditor.com/demo"))
    layout = QtGui.QVBoxLayout(self)
    layout.addWidget(view)

    def main(argv = sys.argv):
    app = QtGui.QApplication(sys.argv)
    form = HTMLEditor()
    form.show()
    app.exec_()

    if name == 'main':
    main()
    @

    Any idea what's going on here?

    Cheers,

    Patrick

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved