qtwebkit

How do I develop a plug-in for QtWebKit?

I am trying to develop a plug-in for QtWebkit. But I am not able to find how to develop a plugin for QtWebKit, hopefully one that can be invoked by JavaScript. Does anyone know of any tutorials or documents that explain how to do this? Webkit has been intregated into Qt and this integrated package is called QtWebkit. They have provided...

How to get Javascript in a QWebView to create new instances of C++ based classes?

I've successfully added an C++ object to a QWebFrame with addToJavaScriptWindowObject, and can call a slot on that object from javascript. But what I really want to do is have one of those slots return a new object. For example, I have a slot like this, which returns a QObject derived class instance: MyObject* MyApp::helloWorld() ...

Problem loading a specific website through Qt Webkit

I am currently using the following PyQt code to create a simple browser: import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtWebKit import * app = QApplication(sys.argv) web = QWebView() web.load(QUrl("http://www.robeez.com")) web.show() sys.exit(app.exec_()) Websites like google.com or stackoverflow.com work...

QtWebKit, QWebElement::setPlainText() problem

From Qt online help: void QWebElement::setPlainText ( const QString & text ) Replaces the existing content of this element with text. This is equivalent to setting the HTML innerText property. My code: QWebElement login = doc.findFirst("input[name=\"login\"]"); login.setPlainText("alibaba"); qDebug() << login.toPlainText...

QWebElement information where on page it is rendered ?

Looks like access to DOM and rendering details of HTML tags are not availabel in qt 4.5.x . Current snapshot QWebElement looks like proper class to be used there Anybody can give me info if is it possible to get from QWebElement information where on page it was rendered ? Or there are other ways to get that information ? TIA, regards ...

How to know when a web page is loaded when using QtWebKit?

Both QWebFrame and QWebPage have void loadFinished(bool ok) signal which can be used to detect when a web page is completely loaded. The problem is when a web page has some content loaded asynchronously (ajax). How to know when the page is completely loaded in this case? ...

Virtual keyboard for QtWebKit based browser or how can I get the currently focused text field?

Hello everyone, I'm working on implementing a virtual keyboard for a QtWebKit based browser. I'm having a lot of difficulty understanding how QtWebKit paints the controls within the actual page. Initially I thought they were QLineEdit instances, but they are not. Diving into implementation it appears that the glue code between Qt and Web...

Qt4: How to call JavaScript functions in a page from C++ via QtWebkit?

Greetings everyone, I'm trying to write a simple log viewer using Qt4's WebKit port/implementation. My HTML code looks like this: http://pastie.org/613296 More specifically, I'm trying to find out how to call the add_message() function which is defined in the <script> section in the HTML document from my C++ code. // Doesn't work...

Why does QWebFrame::evalutateJavaScript do nothing in this case?

I'm calling QWebFrame::evaluateJavaScript in one place in my code and it has no effect. However, if I replace this call with the setTimer(0) call and will call the original function when this timer times out it works. How do I know if it works or not? The JavaScript code which is evaluated in my case calls one JavaScript function which i...

fit-to-window-width for a QWebView

I'm writing an ebook viewer in C++ using Qt 4.5, using the QWebView object to render html files. Some of the html files need a high window width, otherwise an horizontal scroll bar will appear, which is very annoying, thus I would like to implement an option to fit the content to the window width. Please, do you have any idea how to ma...

Disable drag/drop in QtWebkit

Hi I am trying to create an HTML GUI for an application using Qt's WebKit... so far everything is going smooth with a minor problem, I don't want people to be able to drag and drop images from my GUI. I have disabled text selection using a small java script. But I'm not sure how to disable image dragging.... I have used onmousedown="ret...

QtWebKit Manager

Hi I've been asked to research a way to manage a QTWebKit module outside of QT. The idea is to use QTWebKit as an interface(GUI) for an application. The desired (Manager) should work as a communication mean between the GUI and the main application which is written in C++. The manager should be designed in a way that it can produce java...

NPAPI plugin in QTWebKit

I know its possible to integrate NPAPI plugins with QTWebKit as its been supported since the release of QT 4.5. My question is, should I go and design my plugin according to the Mozilla/Gecko documentaion -Which is probably the only available/reliable documentation for NPAPI beside some really old book called "Programming NetScape Plug-...

add a new plugins path to Qtwebkit

Hi I am trying to extend the search paths that qtwebkit uses to search for plugins. Basically I'm creating a plugin that is designed using the QTBrowserPlugin class and I am trying to make my browser which is programmeed using QTwebKit to search for the plugin in a folder specified by me as I don't want the plugin to be stored in the Mo...

QtWebkit synchronous loading

Hi, I'm using a QWebPage without a QWebView because I want to render the contents of an HTML file onto a QPixmap/QImage. I want the loading of the page to be done synchronously, not asynchronously which is the default. The default way is to call QWebFrame::setHtml() or QWebFrame::setContent(), but this loads images asynchronously. Wha...

Disable text selection in QT/WebKit GUI

I'm checking if it would be possible to implement a GUI using HTML through PyQT and WebKit. One of the problem is that using the mouse you can select the text making up the interface. Can this behaviour be disabled? Also, the mouse pointer changes to an insertion caret while over the selectable text. I would like to disable this, withou...

QWebElement manipulation of a QWebPage in a separate thread

Hi, I have a QWebPage created in the main thread (you can't create it anywhere else). I would like to manipulate this page using the QWebElement API introduced in Qt 4.6, but in a separate thread. So that thread would acquire a reference to the page and perform the necessary tree walking and attribute changes I need. As the Threads and...

How to fire user-like event in QWebElement

Is it real to fire user-like events (like mouse click on link) for QWebElement? I.e., for instance, given QWebElement from current frame (using QWebKit) for html tag ("") I want programmatically click() this element. In more complicated situations, there are more interestings things, like How to emit OnChange event for html UL element...

QTWebkit 4.6 and ico images, Rendering problem

Hi I have a local html file which I'm trying to view using QTWebKit, there are some images in the file which are of type ".ico" which seems that QTWebKit is not able to render them as it gives a question mark icon instead. I tried opening the html file in firefox and its working fine and all images gets rendered. My question is, does ...

how to get response in QtWebKit

Hello all im beginner with QtWebKit i build simple web frame that loaded page ( server side ) and when from this page i submit data i like to catch the response string from the server in the c++ side how can i do that ? ...