Search Results

Search found 44 results on 2 pages for 'qtwebkit'.

Page 2/2 | < Previous Page | 1 2 

  • Disable text selection in QT/WebKit GUI

    - by Adal
    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, without disabling the hand mouse pointer which appears when over a clickable link.

    Read the article

  • Using Qt to read and parse html files with QWebKit?

    - by Alberto Toglia
    I would like to read and parse certain elements of html files but I'm not interested in rendering it in any way. Basically I would like to go through all my div tags and get some of its style attributes. This is what I've done so far: QWebPage page; QWebFrame * frame = page.mainFrame(); QUrl fileUrl("localFile.html"); frame->setUrl(fileUrl); QWebElement document = frame->documentElement(); QWebElementCollection elements = document.findAll("div"); foreach (QWebElement element, elements){ std::cout << element.attribute("style").toStdString() << std::endl; } Doesn't show anything. I'm somewhat confused if I could use webkits this way. P.D.: I'm using a filechooser to pick the local html root.

    Read the article

  • How to make QT support HTML 5 database?

    - by Mickey Shine
    I am using Qt 4.7.1 and embedded a webview in my app. But I got the following error when trying to visit http://webkit.org/demos/sticky-notes/ to test the HTML 5 database feature Failed to open the database on disk. This is probably because the version was bad or there is not enough space left in this domain's quota I compiled my static Qt library with the following command: configure --prefix=/usr/local/qt-static-release-db --accessibility --multimedia --audio-backend --svg --webkit --javascript-jit --script --scripttools --declarative --release -nomake examples -nomake demos --static --openssl -I /usr/local/ssl/include -L /usr/local/ssl/lib -confirm-license -sql-qsqlite -sql-qmysql -sql-qodbc

    Read the article

  • How to inject local CSS and JavaScript from qrc:// into QWebView?

    - by speakman
    Trying to inject CSS and JS files reachable through Qt resources (qrc://) through JavaScript (using this technique) which itself is injected through a evalutateJavaScript() call fails fails miserably hitting this test in QNetworkAccessFileBackend. I can't figure how to make this work, really. I could subclass QNAFB but then I would need to subclass QNAM as well to make it instance my subclass instead of QNAFB?

    Read the article

  • How can I load scripts, styles and images from a non-URL source?

    - by Jen
    I am integrating WebKit (via Qt) into an application. Instead of having WebKit retrieve scripts, CSS files and images via URLs, I want my application to provide them (e.g. retrieved from a database). For example, a "regular" web page may contain this tag: <IMG src="photos/album1/123456.jpg"> Instead of WebKit fetching this image from a server or the file system, I would prefer some kind of callback that allows my application to provide this image. How can I accomplish this?

    Read the article

  • How to find out the dimensionality of print paper in javascript

    - by tzador
    I am generating reports in HTML formats, and want to print them automatically using Qt (qt has a webkit based browser, and one can render its contents to a PDF file). I want to position the elements of the report depending on the target page size. For that i need to access the size of the paper (preferably in pixels). Since i am using webkit, it has all the latest html5 and css3 features. is there some api available to access printed page properties inside javascript. for example, would be nice to write: window.print_paper.width or window.print_paper.height Thank you in advance

    Read the article

  • XSLT processing with Qt

    - by swegi
    Hi, I like to display some (X)HTML content in a Qt application using QtWebKit. The content should be generated from XML documents via XSLT. As I am new to Qt, my questions are as follows: 1) Can QtWebKit display XML documents with the xml-stylesheet element set? 2) Can Qt apply XSLT to an XML document and return the result as a string or write it to a file?

    Read the article

  • QWebView not loading external resources

    - by Nick
    Hi. I'm working on a kiosk web browser using Qt and PyQt4. QWebView seems to work quite well except for one quirk. If a URL fails to load for any reason, I want to redirect the user to a custom error page. I've done this using the loadFinished() signal to check the result, and change the URL to the custom page if necessary using QWebView.load(). However, any page I attempt to load here fails to pull in external resources like CSS or images. Using QWebView.load() to set the initial page at startup seems to work fine, and clicking any link on the custom error page will result in the destination page loading fine. It's just the error page that doesn't work. I'm really not sure where to go next. I've included the source for an app that will replicate the problem below. It takes a URL as a command line argument - a valid URL will display correctly, a bad URL (eg. DNS resolution fails) will redirect to Google, but with the logo missing. import sys from PyQt4 import QtGui, QtCore, QtWebKit class MyWebView(QtWebKit.QWebView): def __init__(self, parent=None): QtWebKit.QWebView.__init__(self, parent) self.resize(800, 600) self.load(QtCore.QUrl(sys.argv[1])) self.connect(self, QtCore.SIGNAL('loadFinished(bool)'), self.checkLoadResult) def checkLoadResult(self, result): if (result == False): self.load(QtCore.QUrl('http://google.com')) app = QtGui.QApplication(sys.argv) main = MyWebView() main.show() sys.exit(app.exec_()) If anyone could offer some advice it would be greatly appreciated.

    Read the article

  • Py2exe, PyQt4 and Postgre Driver (QPSQL)

    - by Marshall
    Hi, I`m trying to freeze my application using Py2exe. My app uses PyQt4 and it apparently works fine with py2exe. But once I`ve uninstalled PyQt, it shows the following error: QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available driver: QPSQL7 QPSQL Which doesn't make sense at all. If PyQt4 is still installed, it works just fine. This is my py2exe parameters: data_files = [ ('sqldrivers', [ 'C:\Python26\Lib\site-packages\PyQt4\plugins\sqldrivers\qsqlpsql4.dll' ]) ] setup(console=["delivery.py"], options={"py2exe" : {"includes" : ["sip", "PyQt4.QtSql", "PyQt4.QtWebKit", "PyQt4.QtNetwork"]}}, data_files=data_files)

    Read the article

  • TypeError: Cannot call method 'hasOwnProperty' of null, while creating a QMLscene window

    - by tomoqv
    I am trying to make a simple Ubuntu Touch web application with Qt Creator. I have set up a new project according to the tutorial and committed the files to Bazaar. I have set a url instead of the default index.htm in the qml file of the project. Using build-run loads a QML Scene window with the desired webpage, but Qt Creator yields the following output: Starting /usr/lib/i386-linux-gnu/qt5/bin/qmlscene -I /home/tomas/ubuntu-sdk/SL-planner -I /usr/bin -I /usr/lib/i386-linux-gnu/qt5/qml /home/tomas/ubuntu-sdk/SL-planner/SL-planner.qml unity::action::ActionManager::ActionManager(QObject*): Could not determine application identifier. HUD will not work properly. Provide your application identifier in $APP_ID environment variable. file:///usr/lib/i386-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:257: TypeError: Cannot call method 'hasOwnProperty' of null My SL-planner.qml looks like this: import QtQuick 2.0 import Ubuntu.Components 0.1 import QtWebKit 3.0 /*! \brief MainView with a Flickable WebView. */ MainView { // objectName for functional testing purposes (autopilot-qt5) objectName: "mainView" // Note! applicationName needs to match the "name" field of the click manifest applicationName: "com.ubuntu.developer.tomoqv.SL-planner" /* This property enables the application to change orientation when the device is rotated. The default is false. */ automaticOrientation: true width: units.gu(100) height: units.gu(75) Flickable { id: webViewFlickable anchors.fill: parent WebView { id: webView anchors.fill: parent url: "http://mobil.sl.se" } } } What am I missing?

    Read the article

  • Get http status in Qt WebKit

    - by RR
    Hello all: What I would like to implement is 1 Using Qt's WebView(part of QtWebKit) to access some page. 2 Show specified html page if got HTTP 4xx, 5xx status (Ex HTTP 404, 500). 3 Also shows specified page when network connection is unavailable. For now, I had only done job 1... In job 2, how did I get http status from WebView ? In job 3, I'm looking about QUrl APIs now. Anyone have idea or expreience yet ?

    Read the article

  • HTML Rendering Engine as a Java Control

    - by SvrGuy
    Hi All, We have a client side application (Java/Swing) that we need an HTML rendering control for. What I want to find is the most widely adopted, most heavily developed, easiest to deploy solution to get Gecko or WebKit into a Swing app (Needs to run OS X and Windows). The limited (crappy?) JEditPane type solutions are not robust enough for our needs. We would really like to use either WebKit or Gecko. Some libraries seems to exist that would allow this: (QT WebKit) http://trac.webkit.org/wiki/QtWebKit (JRex) [can not post URL because I am new] etc. Whats the best library to achieve this?

    Read the article

  • Emulating a web browser

    - by Sean
    Hello, we are tasked with basically emulating a browser to fetch webpages, looking to automate tests on different web pages. This will be used for (ideally) console-ish applications that run in the background and generate reports. We tried going with .NET and the WatiN library, but it was built on a Marshalled IE, and so it lacked many features that we hacked in with calls to unmanaged native code, but at the end of the day IE is not thread safe nor process safe, and many of the needed features could only be implemented by changing registry values and it was just terribly unflexible. Proxy support JavaScript support- we have to be able to parse the actual DOM after any javascript has executed (and hopefully an event is raised to handle any ajax calls) Ability to save entire contents of page including images FROM THE loaded page's CACHE to a separate location ability to clear cookies/cache, get the cookies/cache, etc. Ability to set headers and alter post data for any browser call And for the love of drogs, an API that isn't completely cryptic Languages acceptable C++, C#, Python, anything that can be a simple little console application that doesn't have a retarded syntax like Ruby. From my own research, and believe me I am terrible at google searches, I have heard good things about WebKit... would the Qt module QtWebKit handle all these features?

    Read the article

  • Qt - QWebView Problem

    - by user547057
    Hi, I have a PyQt gui script which consists of a QWebView widget. I'm trying to send a GET request, i.e go to a page, fill a form and hit click using the code at the bottom of this question. Since i'm dealing with the documentElement(a QWebElement) of the webview, I need to place all DOM actions in a separate function(which I have named fillForm) and connect the loadFinished() signal into the function. Without connecting the signal, the document will not have loaded and I won't be able to get the elements I want. I'm able to submit the form correctly and get the proper response from the webpage. The problem i'm having is that, the above leads to a sort of infinite loop. This is because the webpage gets reloaded each time a new page is loaded, so the form gets filled each and every single time without stopping. I'd like to know if there's some way of finding out whether the WebView's page has loaded fully, non-asynchronously or maybe pause execution of the script(without freezing the gui) until the whole document has loaded. I'm unable to come up with a satisfactory solution(my idea consisted of keeping a global variable to track clicks) to this problem. I would appreciate it if someone could help me out with a better way to tackle this. Thanks! Here's the code i'm using import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtWebKit import * from PyQt4 import QtCore app = QApplication(sys.argv) web = QWebView() web.load(QUrl("http://mywebsite.com")) def fillForm(): doc = web.page().mainFrame().documentElement() searchform = doc.findFirst("input[type=text]") searchform.setAttribute("value", "hello") button = doc.findFirst("input[type=submit]") button.evaluateJavaScript("click()") QtCore.QObject.connect(web, QtCore.SIGNAL("loadFinished"), fillForm) web.show() sys.exit(app.exec_())

    Read the article

  • Capturing mouse events for specific dom/web elements in QT

    - by Red Serpent
    Hi I would like to know if it is possible in QTWebKit to install an event filter or capture events that occur from specific Dom elements. For example, my webview is showing a webpage that has text, images and an edit box, I want to disable the right-clicking and highlighting functionality on the text and images but at the same time when the user right-clicks inside the edit box, I want to display my context menu. I am not sure where should I install my event filter, in QwebView or QwebPage... currently this is what I'm using: MainWindow::MainWindow() { centralWidget = new WebView(this); setCentralWidget(centralWidget); centralWidget->webView->installEventFilter(this); //No mouse events are rising on QWebPage //centralWidget->webView->page()->installEventFilter(this); } As its clear in the code above, when installing an EventFilter on QwebPage, I never receive any QMouseEvents, not by moving clicking or releasing any mouse buttons. While when setting it to filter events from QWebView it works fine. I am really interested with the first part of my question as to how handle Dom elements differently. How can I achieve such goal? Regards

    Read the article

  • qwebview in pyside after packaged with pyinstaller goes wrong

    - by truease.com
    Here's my code import sys from PySide.QtCore import * from PySide.QtGui import * from PySide.QtWebKit import * from encodings import * from codecs import * class BrowserWindow( QWidget ): def __init__( self, parent=None ): QWidget.__init__( self, parent ) self.Setup() self.SetupEvent() def Setup( self ): self.setWindowTitle( u"Truease Speedy Browser" ) self.addr_input = QLineEdit() self.addr_go = QPushButton( "GO" ) self.addr_bar = QHBoxLayout() self.addr_bar.addWidget( self.addr_input ) self.addr_bar.addWidget( self.addr_go ) for attr in [ QWebSettings.AutoLoadImages, QWebSettings.JavascriptEnabled, QWebSettings.JavaEnabled, QWebSettings.PluginsEnabled, QWebSettings.JavascriptCanOpenWindows, QWebSettings.JavascriptCanAccessClipboard, QWebSettings.DeveloperExtrasEnabled, QWebSettings.SpatialNavigationEnabled, QWebSettings.OfflineStorageDatabaseEnabled, QWebSettings.OfflineWebApplicationCacheEnabled, QWebSettings.LocalStorageEnabled, QWebSettings.LocalStorageDatabaseEnabled, QWebSettings.LocalContentCanAccessRemoteUrls, QWebSettings.LocalContentCanAccessFileUrls, ]: QWebSettings.globalSettings().setAttribute( attr, True ) self.web_view = QWebView() self.web_view.load( "http://www.baidu.com" ) layout = QVBoxLayout() layout.addLayout( self.addr_bar ) layout.addWidget( self.web_view ) self.setLayout( layout ) def SetupEvent( self ): self.connect( self.addr_input, SIGNAL("editingFinished()"), self, SLOT("Load()"), ) self.connect( self.addr_go, SIGNAL("pressed()"), self, SLOT("Load()") ) self.connect( self.web_view, SIGNAL("urlChanged(const QUrl&)"), self, SLOT("SetURL()"), ) def Load( self, *args, **kwargs ): url = self.GetCleanedURL() if url != self.CurrentURL(): self.web_view.load( url ) def SetURL( self, *args, **kwargs ): self.addr_input.setText( self.CurrentURL() ) def GetCleanedURL( self ): url = self.addr_input.text().strip() if not url.startswith("http"): url = "http://" + url return url def CurrentURL( self ): url = self.web_view.url().toString() return url def Main(): app = QApplication( sys.argv ) widget = BrowserWindow() widget.show() return app.exec_() if __name__ == '__main__': sys.exit( Main() ) I works well when i using python browser.py. but it goes wrong after packaged with pyinstaller -w browser.py. it doesn't load images can only display correct text in utf-8 And this is the pyinstaller output: E:\true\wuk\app2>pyinstaller -w b.py 16 INFO: wrote E:\true\wuk\app2\b.spec 16 INFO: Testing for ability to set icons, version resources... 32 INFO: ... resource update available 32 INFO: UPX is not available. 46 INFO: Processing hook hook-os 141 INFO: Processing hook hook-time 157 INFO: Processing hook hook-cPickle 218 INFO: Processing hook hook-_sre 312 INFO: Processing hook hook-cStringIO 407 INFO: Processing hook hook-encodings 421 INFO: Processing hook hook-codecs 750 INFO: Processing hook hook-httplib 750 INFO: Processing hook hook-email 843 INFO: Processing hook hook-email.message 1046 WARNING: library python%s%s required via ctypes not found 1171 INFO: Extending PYTHONPATH with E:\true\wuk\app2 1171 INFO: checking Analysis 1171 INFO: building because b.py changed 1171 INFO: running Analysis out00-Analysis.toc 1171 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable 1171 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww ... 1171 INFO: Found manifest C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375.manifest 1187 INFO: Searching for file msvcr90.dll 1187 INFO: Found file C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\msvcr90.dll 1187 INFO: Searching for file msvcp90.dll 1187 INFO: Found file C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\msvcp90.dll 1187 INFO: Searching for file msvcm90.dll 1187 INFO: Found file C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\msvcm90.dll 1266 INFO: Analyzing D:\Applications\Python\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\_pyi_bootstrap.py 1266 INFO: Processing hook hook-os 1282 INFO: Processing hook hook-site 1296 INFO: Processing hook hook-encodings 1391 INFO: Processing hook hook-time 1407 INFO: Processing hook hook-cPickle 1468 INFO: Processing hook hook-_sre 1578 INFO: Processing hook hook-cStringIO 1671 INFO: Processing hook hook-codecs 2016 INFO: Processing hook hook-httplib 2016 INFO: Processing hook hook-email 2109 INFO: Processing hook hook-email.message 2312 WARNING: library python%s%s required via ctypes not found 2468 INFO: Processing hook hook-pydoc 2516 INFO: Analyzing D:\Applications\Python\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_importers.py 2609 INFO: Analyzing D:\Applications\Python\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_archive.py 2687 INFO: Analyzing D:\Applications\Python\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_carchive.py 2782 INFO: Analyzing D:\Applications\Python\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_os_path.py 2782 INFO: Analyzing b.py 2796 INFO: Processing hook hook-PySide 2875 INFO: Hidden import 'codecs' has been found otherwise 2875 INFO: Hidden import 'encodings' has been found otherwise 2875 INFO: Looking for run-time hooks 7766 INFO: Using Python library C:\WINDOWS\system32\python27.dll 7796 INFO: E:\true\wuk\app2\build\b\out00-Analysis.toc no change! 7796 INFO: checking PYZ 7812 INFO: checking PKG 7812 INFO: building because E:\true\wuk\app2\build\b\b.exe.manifest changed 7812 INFO: building PKG (CArchive) out00-PKG.pkg 7828 INFO: checking EXE 7843 INFO: rebuilding out00-EXE.toc because pkg is more recent 7843 INFO: building EXE from out00-EXE.toc 7843 INFO: Appending archive to EXE E:\true\wuk\app2\build\b\b.exe 7843 INFO: checking COLLECT 7843 INFO: building COLLECT out00-COLLECT.toc Use pyinstaller browser.py, and in the console window i got QFont::setPixelSize: Pixel size <= 0 (0) QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QFont::setPixelSize: Pixel size <= 0 (0)

    Read the article

  • How to install PyQt on Mac OS X 10.6.

    - by Jebagnanadas
    Hello all, I'm quite new to Mac OS X. when i tried to install PyQt on Mac Os X after installing python 3.1, Qt 4.6.2 and SIP 4.10.1 i encounter the following error when i execute $python3 configure.py command. Determining the layout of your Qt installation... This is the GPL version of PyQt 4.7 (licensed under the GNU General Public License) for Python 3.1 on darwin. Type '2' to view the GPL v2 license. Type '3' to view the GPL v3 license. Type 'yes' to accept the terms of the license. Type 'no' to decline the terms of the license. Do you accept the terms of the license? yes Checking to see if the QtGui module should be built... Checking to see if the QtHelp module should be built... Checking to see if the QtMultimedia module should be built... Checking to see if the QtNetwork module should be built... Checking to see if the QtOpenGL module should be built... Checking to see if the QtScript module should be built... Checking to see if the QtScriptTools module should be built... Checking to see if the QtSql module should be built... Checking to see if the QtSvg module should be built... Checking to see if the QtTest module should be built... Checking to see if the QtWebKit module should be built... Checking to see if the QtXml module should be built... Checking to see if the QtXmlPatterns module should be built... Checking to see if the phonon module should be built... Checking to see if the QtAssistant module should be built... Checking to see if the QtDesigner module should be built... Qt v4.6.2 free edition is being used. Qt is built as a framework. SIP 4.10.1 is being used. The Qt header files are in /usr/include. The shared Qt libraries are in /Library/Frameworks. The Qt binaries are in /Developer/Tools/Qt. The Qt mkspecs directory is in /usr/local/Qt4.6. These PyQt modules will be built: QtCore. The PyQt Python package will be installed in /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages. PyQt is being built with generated docstrings. PyQt is being built with 'protected' redefined as 'public'. The Designer plugin will be installed in /Developer/Applications/Qt/plugins/designer. The PyQt .sip files will be installed in /Library/Frameworks/Python.framework/Versions/3.1/share/sip/PyQt4. pyuic4, pyrcc4 and pylupdate4 will be installed in /Library/Frameworks/Python.framework/Versions/3.1/bin. Generating the C++ source for the QtCore module... sip: Usage: sip [-h] [-V] [-a file] [-b file] [-c dir] [-d file] [-e] [-g] [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-r] [-s suffix] [-t tag] [-w] [-x feature] [-z file] [file] Error: Unable to create the C++ code. Anybody here installed PyQt on Mac OS X 10.6.2 successfully.. Any help would be much appreciated.. Thanks in advance..

    Read the article

< Previous Page | 1 2