Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.4k Posts
  • [Solved] Loading a ListModel dynamically

    5
    0 Votes
    5 Posts
    4k Views
    S
    Ok, I have this working now thanks. The assignment wasn't working because I had a wrapper (item) around the ListView that wasn't passing on the assignment. I have also improved the mechanism by having a signal when the data has loaded which then causes the assignment in the view. Thanks Simon
  • 0 Votes
    8 Posts
    11k Views
    K
    Thanks for all your answers. I will try to go with QDeclarativeExtensionPlugin and initializeEngine, and I am looking forward for new version of QT, guys.
  • Question on QDeclarativeItem attribute/properties

    9
    0 Votes
    9 Posts
    5k Views
    M
    One more link of interest in regards to testing QML: http://bugreports.qt.nokia.com/browse/QTBUG-15801 (QML testing requirements)
  • Transparency of Flickable (and Border Merge)

    5
    0 Votes
    5 Posts
    5k Views
    H
    Thank you very much Michael, Mario and Bradley for your help. Those issues are fixed. Negative value for spacing worked. Sorry, Bradley, for having missed closing brace.
  • QML Simulator

    3
    0 Votes
    3 Posts
    3k Views
    K
    [quote author="GregEdwds" date="1292332116"]Hi All, I've recently replaced my Qt SDK with the latest version (2010-11-24) and noticed that the default QML viewer has been replaced with Simulator... I assume the Simulator is a wrapper around the original QML viewer? As I'm working on different screen dimensions to those listed in the Simulator it proving not very helpful. Is it possible to change the default QML player in Qt Creator? I see that I can setup another 'Run configuration' but where is 'QMLViewer.app'? thanks Greg [/quote] You can find the QMLViewer.exe binary under the bin folder of your QtDir
  • Q_ENUMS problem

    4
    0 Votes
    4 Posts
    7k Views
    B
    i got it. thanks again qmlRegisterType<MyClass>(“MyImport”, 1, 0, “MyClass”); in QML: import MyImport 1.0 and then use: var task = MyClass.Task1;
  • [Poll] How should the QML elements page be presented?

    10
    0 Votes
    10 Posts
    5k Views
    N
    [quote author="Denis Kormalev" date="1291991675"]I think both should be implemented. For newbies use-case view is better, but for more experienced developers alphabetical list is much more useful (they know what they look for and can find it in sorted list much faster than in use-cased list)[/quote] I agree. Ideally both of them.
  • [solved] QML app asks for internet connection on maemo device

    18
    0 Votes
    18 Posts
    11k Views
    F
    Unfortunately that has been the issue with qt on maemo5. Because Qt is part of the "system" it can't be updated by itself. There has been some discussion on maemo.org if distributing Qt will continue being Nokia responsibility or will be managed by the community. I don't know if the discussion went anywhere (or if it will) but it would be great to have the community manage it so we can have updates more often. If not, it may be worth making a little more flexible the rules about creating applications that depends on the qt-experimental packages.
  • How to change the current time with Text

    25
    0 Votes
    25 Posts
    15k Views
    F
    This thread deserves becoming a wiki... It is very interesting to have developers trying to come up with different approaches to the same problem. Maybe we could make that a "regular" activity. Someone suggests a problem and we spend few days trying to propose different solutions. Anybody up for it?
  • Qt Creator, localization and work flow

    6
    0 Votes
    6 Posts
    8k Views
    S
    Are this link update to the latest version of linguist? Last version is 4.7.1 here is 4.6.0. [quote author="SimonJudge" date="1292250551"] [quote author="QtK" date="1292240878"] [quote author="stuk" date="1292238939"]I use this on windows, i don't know that linguist not work on linux.[/quote] It does run on linux. "Here":http://qt.nokia.com/images/products/qt-linguist-screenshot-linux/view is a screenshot of the same.[/quote] Interesting. Do you know where to find the download for this? The Windows and Mac downloads are at... http://qt-apps.org/content/show.php/Qt+Linguist+Download?content=89360 Thanks Simon[/quote]
  • Modal Flickable List

    13
    0 Votes
    13 Posts
    6k Views
    H
    Hello, I have a problem with that snippet. When I click on the list within its initial view, it performs fine: the highlight runs to the item currently clicked. But when I scroll that flickable ListView, and my visible area starts for instance with 'index=3' item, this line: list.currentIndex = list.indexAt(mouseX, mouseY) still seems to calculate currentIndex as index at initial view when the visible area starts with 'index=1' item. So the larger list and the scrolling distance, the further the highlight from the actual item it should be below. Did I misunderstand your idea? Please help.
  • Does Qt4.6 and later version only support openGL2 to do openGL rendering?

    6
    0 Votes
    6 Posts
    4k Views
    P
    Yes, by default you will get only 1.1 !! But if you will provide 2.1 declarations Qt will accept it. (so it is only including headers to get 2.1) Docs states that You can also get any version supported by graphic drivers by QGLFormat::setVersion() and QGLFormat::setProfile(). But there is not a single doc covering e.g. how to get tessel shaders into QGLShader, etc. So it should be posibble to run higher than 2.1 but you will have to provide some classes for your self. And You can freely use OpenGL ES 2.0!! (And if you want to cross-develop on mobile and desktop it is best option, and Qt is ready for it). [quote author="Tobias Hunger" date="1284913349"]I have never checked the specifics requirements on OpenGL versions in Qt, but the OpenGL 2.0 specification is from 2004... After 6 years a project should be allowed to depend on it, shouldn't it?[/quote] No it is not! You have to have hardware (easily meat), but also drivers (unlikely but possible problems), and have to manage extensions (MS still do not support easy 2.1 context creation). And for newer specifications (we have 3.3 and 4.1 !!!!) even more problems arise like lack of true cross platform support (4.x only on linux and win 3.x troublesome on mac). And sad but true Nokia and qt team do not look too excited about newest OpenGL specs either.
  • Stirring Qt Quick into the mix

    7
    0 Votes
    7 Posts
    5k Views
    P
    I'm currently looking at using it to replace certain lists and gridviews in a disassembly/decompilation/reverse engineering tool I'm slowly hacking together. The main reason is that the Model-based View controllers have driven me completely insane with their fiddlyness. :| My only issue at the moment a question of performance, for example in a hex-view I'll likely have close to 3000 calls (if not more) to the model per screenfull of data. But that's where algorithm optimisation starts I guess. :)
  • OnPressAndHold emit signal every 'n' ms?

    8
    0 Votes
    8 Posts
    7k Views
    B
    Take a look at the example in examples/declarative/modelviews/listview/dynamic.qml (also online at http://doc.qt.nokia.com/4.7-snapshot/declarative-modelviews-listview-dynamiclist-qml.html). The example uses a "PressAndHold" button (defined in a subdirectory, content/PressAndHold.qml) that emits clicked() multiple times when the mouse button is held down.
  • The right way to create a multi column ListView

    7
    0 Votes
    7 Posts
    15k Views
    J
    Bradey, Thanks a lot for your reply. I tried to do this for the horizontal ListView: @ListModel { id: horizontalList ListElement { name: "Column 1"; model: model1 } ListElement { name: "Column 2"; model: model2 } ListElement { name: "Column 3"; model: model3 } ListElement { name: "Column 4"; model: model4 } } @ But this gave me an error. So I implemented it differently. I defined the list model this way. @ListModel { id: horizontalList ListElement { name: "Column 1"; index: 1 } ListElement { name: "Column 2"; index: 2 } ListElement { name: "Column 3"; index: 3 } ListElement { name: "Column 4"; index: 4 } } @ And then in the vertical list I defined an array of models: @property variant models: [model1, model2, model3, model4] ListView { id: listView anchors.fill: parent model: models[index] delegate: itemDelegate highlight: highlightBar } @ This seems to work so far.
  • QML Map Element

    7
    0 Votes
    7 Posts
    5k Views
    D
    There were some comments in the Mobility lab blog about maps: http://labs.qt.nokia.com/2010/11/09/qt-mobility-1-1-0-released/ Current nokia map source loads tiles from ovi maps, and does not use the map data on the device. Specifically, it does not work offline (though you could implement your own caching-preloading, but you'll need a lot of tiles, not really practical). The map data is not vector based, which is a requirement for the real 3D view, these features however are "on the radar" The faux-3D would be OK for a north up orientation but not be that usable when rotated (i.e. east up or such) as all your labels would be unreadable.
  • I think it is BUG in QML element Flow

    5
    0 Votes
    5 Posts
    4k Views
    S
    *thank you again Mr xsacha It might be the flow property in layout Item.... I think so *
  • Developing UIs with Qt 4.7 and Qt Quick – Americas -- webast today

    29
    0 Votes
    29 Posts
    14k Views
    D
    IIRC, Components should start with uppercase, and ids with lowercase. This is the way that one distinguishes easily between the two.
  • Video introducing Qt Quick demos by Henrick Hartz

    5
    0 Votes
    5 Posts
    4k Views
    D
    I think Alexandra wrote about more video integrated on the devnet, and that a feature was coming. Hopefully, it will start with the videos from the devdays 2010! Anyways, I've split the list in "learning" and "demos", and added some more links.
  • Horizontal ListView / ListModel + Stretching

    2
    0 Votes
    2 Posts
    9k Views
    B
    Something like the following? Anchors are used to position the buttons on the left and right of the parent and the list view is anchored to the sides of the buttons. @ import Qt 4.7 Item { width: 360 height: 360 Rectangle { id: buttonLeft anchors.left: parent.left width: buttonLeftText.width + 10 height: buttonLeftText.height + 10 radius: 3 border.width: 1 smooth: true border.color: "#000000" gradient: Gradient { GradientStop { position: 0 color: "#5e5e5e" } GradientStop { position: 1 color: "#444444" } } Text { x: 5 y: 5 id: buttonLeftText text: "<" color: "#ffffff" } MouseArea { anchors.fill: parent onClicked: { list.currentIndex = Math.max(0, list.currentIndex-1) } } } Rectangle { id: buttonRight anchors.right: parent.right width: buttonRightText.width + 10 height: buttonRightText.height + 10 radius: 3 border.width: 1 smooth: true border.color: "#000000" gradient: Gradient { GradientStop { position: 0 color: "#5e5e5e" } GradientStop { position: 1 color: "#444444" } } Text { x: 5 y: 5 id: buttonRightText text: ">" color: "#ffffff" } MouseArea { anchors.fill: parent onClicked: { list.currentIndex = Math.min(list.count-1, list.currentIndex+1) } } } ListView { id: list clip: true spacing: 5 anchors.top: parent.top anchors.bottom: parent.bottom anchors.right: buttonRight.left anchors.left: buttonLeft.right orientation: ListView.Horizontal model: ListModel { ListElement { name: "Bill Smith" number: "555 3264" } ListElement { name: "John Brown" number: "555 8426" } ListElement { name: "Sam Wise" number: "555 0473" } } delegate: Text { text: name + ": " + number + (index == list.count-1 ? "" : ",") } highlight: Rectangle { width: list.currentItem.width color: "lightsteelblue" radius: 5 } focus: true MouseArea { anchors.fill: parent onClicked: { list.currentIndex = list.indexAt(mouseX, mouseY) } } } } @