Hi again, I've found that localstorage can be enabled in PySide: mSettings = mWebView.settings() mSettings.setAttribute(QWebSettings.LocalStorageEnabled, True) mSettings.setAttribute(QWebSettings.OfflineStorageDatabaseEnabled, True) mSettings.setAttribute(QWebSettings.OfflineWebApplicationCacheEnabled, True) mSettings.enablePersistentStorage(path=sys.path[0])
But in QML, I don't find the equivalent options but: settings.javascriptEnabled: true settings.localStorageDatabaseEnabled: true settings.offlineStorageDatabaseEnabled: true settings.offlineWebApplicationCacheEnabled: true So, the only missing one is: settings.enablePersistentStorage()... Any tip or help? Best regards, 2011/9/6 Jose Manrique Lopez de la Fuente <[email protected]>: > I might be wrong but it might be related with html5 localstorage > support, that might not be well supported by qml/webkit ... > > 2011/9/6 <[email protected]>: >> Write something to console: >> Close enough to the Window or PageStackWindow. >> >> Component.onCompleted: console.log("Python doesn't eat my messages") >> >> Then just strip your small example. Try to figure out if something with qt >> components is working. >> >> :s >> On 9/6/11 2:11 PM, "ext Jose Manrique Lopez de la Fuente" >> <[email protected]> wrote: >> >>>Hi, >>> >>>This is the python file: >>>from PySide import QtCore, QtGui, QtDeclarative >>> >>>if __name__ == '__main__': >>> import sys >>> >>> app = QtGui.QApplication(sys.argv) >>> >>> view = QtDeclarative.QDeclarativeView() >>> >>> view.setSource(QtCore.QUrl('view.qml')) >>> view.showFullScreen() >>> >>> sys.exit(app.exec_()) >>> >>>And this is the output: >>># python main.py >>>Using the meego graphics system >>>RemoteThemeDaemonClient: Failed to connect to theme server (that's OK >>>if you're on a PC) >>>LocalThemeDaemonClient: Looking for assets in >>>"/usr/share/themes/blanco/meegotouch" >>>loaded the Generic plugin >>>loaded the grue plugin >>>Loaded the MeeGo sensor plugin >>>Setting data rate 0 Hz (interval 0 ms) for "meego.orientationsensor" >>>Setting data rate 0 Hz (interval 0 ms) for "meego.orientationsensor" >>>Found SGX/MBX driver, enabling FullClearOnEveryFrame >>>Found v1.4 driver, enabling brokenTexSubImage >>>hijackWindow() context created for QDeclarativeView(0x58e228) 1 >>>Found SGX/MBX driver, enabling FullClearOnEveryFrame >>>Found v1.4 driver, enabling brokenTexSubImage >>>QGLWindowSurface: Using plain widget as window surface >>>QGLWindowSurface(0x70bf58) >>> >>> >>>2011/9/6 <[email protected]>: >>>> Hi, >>>> >>>> QtCreator uses Qt sdk. If you didn't put qt components files to it, it >>>> will complain about missing import. >>>> If you compile for device, it will make additional files available >>>>because >>>> they are available in harmattan. >>>> >>>> Device has qt components. Your sdk - doesn't. >>>> But this may not be the cause for N950 problem. >>>> Launch it from ssh, command line. >>>> :s >>>> >>>> On 9/6/11 1:21 PM, "ext Jose Manrique Lopez de la Fuente" >>>> <[email protected]> wrote: >>>> >>>>>Hi, >>>>> >>>>>If I load the qml file in QtCreator, it says com.nokia.meego 1.0 can >>>>>not be found and Window is an unknown type... >>>>> >>>>>2011/9/6 <[email protected]>: >>>>>> Launch it from command line, you should see errors. Connect to n950 >>>>>>from >>>>>> ssh. You also can use qtsdk and it will deploy and run for you. It >>>>>>should >>>>>> show errors in qtcreator. >>>>>> I guess problems are with imports. You should use import QtQuick 1.1 >>>>>>also. >>>>>> Br, >>>>>> Sergiy >>>>>> >>>>>> On 9/6/11 11:15 AM, "ext Jose Manrique Lopez de la Fuente" >>>>>> <[email protected]> wrote: >>>>>> >>>>>>>Hi, >>>>>>> >>>>>>>I am running the following qml in my laptop and in my N950. In the >>>>>>>laptop, it works as expected. In the N950, I get a white screen. >>>>>>> >>>>>>>I have tried loading the URL site in the N950 browser, and it works as >>>>>>>expectedŠ So I am trying to guess what it¹s going wrong. >>>>>>> >>>>>>>Thank you very much and best regards >>>>>>> >>>>>>>import QtQuick 1.0 >>>>>>>import QtWebKit 1.0 >>>>>>>import com.nokia.meego 1.0 >>>>>>> >>>>>>>Window { >>>>>>> id:rootWindow >>>>>>> >>>>>>> WebView { >>>>>>> id: webView >>>>>>> anchors.fill: parent >>>>>>> width: rootWindow.width >>>>>>> height: rootWindow.height >>>>>>> settings.javascriptEnabled: true >>>>>>> settings.localStorageDatabaseEnabled: true >>>>>>> settings.offlineStorageDatabaseEnabled: true >>>>>>> settings.offlineWebApplicationCacheEnabled: true >>>>>>> url: 'http://www.carefy.com/AHS-Assistant/' >>>>>>> } >>>>>>>} >>>>>>> >>>>>>>-- >>>>>>>J. Manrique López de la Fuente >>>>>>>http://www.jsmanrique.es >>>>>>>_______________________________________________ >>>>>>>Qt-qml mailing list >>>>>>>[email protected] >>>>>>>http://lists.qt.nokia.com/mailman/listinfo/qt-qml >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>>-- >>>>>J. Manrique López de la Fuente >>>>>http://www.jsmanrique.es >>>>>_______________________________________________ >>>>>Qt-qml mailing list >>>>>[email protected] >>>>>http://lists.qt.nokia.com/mailman/listinfo/qt-qml >>>> >>>> >>> >>> >>> >>>-- >>>J. Manrique López de la Fuente >>>http://www.jsmanrique.es >>>_______________________________________________ >>>Qt-qml mailing list >>>[email protected] >>>http://lists.qt.nokia.com/mailman/listinfo/qt-qml >> >> > > > > -- > J. Manrique López de la Fuente > http://www.jsmanrique.es > -- J. Manrique López de la Fuente http://www.jsmanrique.es _______________________________________________ Qt-qml mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-qml
