It is worth pointing out that meego has this feature built in:
http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-maskeditem.html
And even if you are on a different platform, you can just grab the source code from here:
http://qt.gitorious.org/qt-components/qt-components/blobs/master/src/meego/mdeclarativemaskeditem.h (.cpp)
In Qt Quick 2, you could use a shader to achieve the same thing.
I pushed a fix to the Dial control that adds a tickMarksEnabled property, just like in the Slider. Sorry for the confusion. Don't hesitate to report missing features like this on the bug tracker in the future. Mark as "Qt Quick Components"/desktop.
Thanks. In this case I think I'm ok with just iterating through my list (it's not the classical property map usage) BUT I will definitely remember the QDeclarativePropertyMap for another time.
@hoanghua - I just stopped using XMLListModel. Now I use a ListModel and refresh it by removing all entries and populating with output from XmlHttpRequest through JavaScript. Painful to parse responseXML in JavaScript but it is much better than continuously leaking memory.
This is what I'm getting, hope someone can help! Thanks!
!http://iktwo.wikidot.com/local--files/start/er1.png(Test 1)!
!http://iktwo.wikidot.com/local--files/start/er2.png(Test 2)!
Hi Bernhard,
Looks fine :-) . It's always good to describe your use case (which you did), as that allows for the possibility of the team suggesting or implementing alternative solutions.
Regards,
Michael
Andre, nikrools,
Could the QML environment be improved to support this use case better (and if so, any suggestions?), or do you feel like the current solution you are using is "good enough"?
Thanks,
Michael
I ended up using a wrapper QML file anyway for other needs, but I will actually need to update it now to another component. So I think I'll try this new method too. Thanks!
okay. i based my actions on your answer.
i stored my contents inside a text file (our professor's requiring us to do so)
i made this code
@import QtQuick 1.0
import com.nokia.symbian 1.0
Page {
id: lolPage
objectName: "lolPage"
ListModel {
id: jokeModel
ListElement{
joke: Qt.resolvedUrl(jokes.text = TextFile.readLine())
}
Component{
id: jokeDelegate
ListItem{
height: 200
Column{
Text{
id: textJoke
text: joke
color: "black"
font.pixelSize: 20
}
}
}
}
ListView{
anchors.fill: parent
model: jokeModel
delegate: jokeDelegate
}
}@
what am i doing wrong here? i do not know how to call and display the contents of an external file using ListModel.
[quote author="Alicemirror" date="1316071074"] doxygen can't manage QML in a decent way.
[/quote]
Can doxygen create documentation for qml?
[quote author="sigrid" date="1315917451"]
Also, note that there will be a qml parser in qdoc3 in Qt 5. It is work in progress, but it is coming.[/quote]
What do you mean?Will this parser create automatically documentation for QML if the right comments exist?
Can you provide me please a link to it?
Also in order qdoc3 to work does it require the project to use qmake?
thanks
No worries! I probably stressed the importance of translating the app name more than it's worth :) My first two N9 apps were designed to look like built-in applications that shipped with the phone, therefore it was important to me, however an 'definitely third-party' app wouldn't need it. And using TrIds from the beginning means that if you do decide to localise the app name then the largest bulk of work is already done.
Glad I could help in any way -- I think I'll write an article on my blog regarding the rest of the post, simply because I figured it out after a lot of trial and error and it would be good to save those who are interested the hassle.
Nice work on the tutorial, looking forward to seeing the final!
Did you have a look at "stylesheets":http://doc.qt.nokia.com/4.8-snapshot/stylesheet-examples.html#customizing-qpushbutton?
It is possible to make the appearance different depending on the clicked state using stylesheets.
Edit : Here is a "similar thread":http://developer.qt.nokia.com/forums/viewthread/867
You could find similar topics yourself using the tag system on the right of your screen. ;)
Hi nightroad,
What's the property type for the icon property? I'm guessing variant, if you are getting this warning? If that is the case, changing the property type to string or url should fix the issue (assuming you are able to change the component definition).
Regards,
Michael