Hi zhouquan, i don't think QML can display html file directly. But the Text element can be display as css styled text. When you use a listView, the most important part for your page is how you design your delegate.
As you use a html file to store the data, you can use a webpage(QML webview element) as your delegate, but it's need webkit, so you can not ignore the cost of webkit. And also, if you html file is simple(simple to read, simple to parse), you can try parse it yourself, and determin how to layout your delegate.
ListView can make your pages continuously :-)
Btw, if you still confused, you can post a topic using Chinese in Chinese forum:
Found notice on the Screen component. I interpret it as a lack in the documentation. The QML Screen Element is part of the new set of Qt Quick components recently released. It is tru that are experimental but following the link in the Qt labs you go to the new developer documentation area so why don't add links to the rest of the documentation ?
This is not so clear and not intuitive: people expect that Qt-Quick components are objects to build UI - as described in most of the posts relative to this useful update - The QML Screen Element is part of them and I have found no links in the documentation. In the Qt elements page maybe useful for example a bottom secion with womething like "Experimental components" or "new released components" I think it maybe sufficient to invite the developers to investigate in-depth.
In the actual Qt-Creator local documentation the QML Screen Element is mentioned without any reference to the fact that it is part of the Qt-Qtuick new tools components that should be imported in the user space.
The example reports:
so how will i do it? is there any possible means of loading another qml file without overlaying the previous one?? my game involves many levels of which will took place on different areas and different format of game..
For Qt Quick components we can not modify these attributes unless they are made available through the elements. This looks like a big problem as many customers wants the UI components to look certain way ( eg: toolbar should be in blue color etc ).
You just have to code a QDeclarativeItem subclass in C++ with the methods (and the internal state information like current directory, etc.) you need and register it at runtime so it becomes accessible as a QML Element as described here: http://doc.qt.nokia.com/4.7-snapshot/qml-extending.html
Better if you define a QDeclarativeItem subclass that performs the file handling operations including most of the complex stuff and then emits a signal when done or exposes a QML ListModel with the result of the operations performed.
For example, when you change the source property in the QML Image element , the element performs lots of file operations and data conversions, but on the UI side you just get onStatusChanged signals and the UI perform a refresh of the image.
i created a screen with Qt.createComponent and then saved a pointer to it in a container used as history. I would set the opacity to 0 when I created another screen. This was part of a Back Button feature but I scrapped the pointer approach and use a Loader.
Since the loader deletes screens as it loads new ones there is no resource contention.
If you are trying in QtQuick 1.1, you could use Qt.application.active to check if application is active or not. Otherwise you could listen for QEvent::ApplicationActivate, QEvent::ApplicationDeActivate in your cpp code and then communicate it to qml objects in your QtQuick app
[quote author="aabc" date="1310297954"]Is it possible to pass ListModel to ListView with some missing parameters?
Is there a way to write a delegate that uses only the parameters that the model gave it and use default parameters for those who dont?[/quote]
Yes, you totally can do that. Check the sample below:
label: QT_TR_NOOP("Item 1")
label: QT_TR_NOOP("Item 2")
Then in the delegate:
To follow up on my problem. I tried to rotate the image in the Flickable instead and even setting the Flickable.contentWidth/Height. The weird thing is it seems that the contentWidth and Height are updated in both cases (rotating either the Flickable or the Image inside it) showing the new sizes. It's just the flickable boundaries that are not properly updated.
Thank a lot for your comments
[quote author="Eddy" date="1310279256"]Hi Changsheng, What you can do to find the articles back you like is using the rate up button. In the future there will be a way to filter those you have rated up. At this moment you could add the page to your bookmarks in your favorite web browser.[/quote]
[quote author="Denis Kormalev" date="1310118646"]FlyingFish, it depends on your data structures. If you store data in JS/QML then it will be better to implement search in JS, if you store data in C++ then C++ search will fit better.[/quote]
Oh, well that explains a lot. I've been trying to use C++ and it wasn't doing the job right. Thanks Denis! :D.