Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • [Solved] Create listmodel in a function

    3
    0 Votes
    3 Posts
    2k Views
    S
    I am also interested in seeing how you created a dynamic list. This would help greatly. Like do you do some array type work as well?
  • [Solved] Read different Feeds

    5
    0 Votes
    5 Posts
    3k Views
    L
    Hey really thousand thanks to you, it seems like I had overred that peace of information from the doc. Problem solved, it works great now!
  • [SOLVED]Setting state in Loader component

    4
    0 Votes
    4 Posts
    7k Views
    I
    hey i also have one problem with loader.......... consider the below code...... @import QtQuick 1.0 Rectangle { id: container width: 300 height: 500 color: "black" Loader { id: loader width: 300 height: 500 anchors.rightMargin: 0 anchors.fill: parent visible: source != "" } Column { x: 25 y: 35 opacity: 1 clip: false anchors.verticalCenterOffset: 0 anchors.horizontalCenterOffset: 0 spacing: 10 anchors.centerIn: parent visible: !loader.visible Button1 { label: "Play"; onClicked: container.state = "play" } Button1 { label: "Controls"; onClicked: container.state = "control" } Button1 { label: "About Us"; onClicked: container.state = "aboutus" } Button1{ label: "Quit"; onClicked: Qt.quit(); } } Connections { target: loader.source != "" ? loader.item : null onClicked: loader.source = "" } states: [ State { name: "play" PropertyChanges { target: loader x: 0 y: 0 anchors.rightMargin: 0 anchors.bottomMargin: 0 anchors.leftMargin: 0 anchors.topMargin: 0 source: "Play.qml" } }, State { name: "control" PropertyChanges { target: loader x: 0 y: 0 anchors.rightMargin: 0 anchors.bottomMargin: 0 anchors.leftMargin: 0 anchors.topMargin: 0 source: "Control.qml" } }, State { name: "aboutus" PropertyChanges { target: loader x: 0 y: 0 anchors.rightMargin: 0 anchors.bottomMargin: 0 anchors.leftMargin: 0 anchors.topMargin: 0 source: "Aboutus.qml" } }@ this code work fine....iand i am able to navigate through pages........but...if i made till changes in the above code...like the one below...the code doesnot work... @import QtQuick 1.0 Rectangle { id: container width: 300 height: 500 color: "black" item{ id:item1; source:"/pics/sun.png"; } Loader { id: loader width: 300 height: 500 anchors.rightMargin: 0 anchors.fill: parent visible: source != "" } Column { x: 25 y: 35 opacity: 1 clip: false anchors.verticalCenterOffset: 0 anchors.horizontalCenterOffset: 0 spacing: 10 anchors.centerIn: parent visible: !loader.visible Button1 { label: "Play"; onClicked: container.state = "play" } Button1 { label: "Controls"; onClicked: container.state = "control" } Button1 { label: "About Us"; onClicked: container.state = "aboutus" } Button1{ label: "Quit"; onClicked: Qt.quit(); } } Connections { target: loader.source != "" ? loader.item : null onClicked: loader.source = "" } states: [ State { name: "play" PropertyChanges { target: loader x: 0 y: 0 anchors.rightMargin: 0 anchors.bottomMargin: 0 anchors.leftMargin: 0 anchors.topMargin: 0 source: "Play.qml" } }, State { name: "control" PropertyChanges { target: loader x: 0 y: 0 anchors.rightMargin: 0 anchors.bottomMargin: 0 anchors.leftMargin: 0 anchors.topMargin: 0 source: "Control.qml" } }, State { name: "aboutus" PropertyChanges { target: loader x: 0 y: 0 anchors.rightMargin: 0 anchors.bottomMargin: 0 anchors.leftMargin: 0 anchors.topMargin: 0 source: "Aboutus.qml" } }@ here i have just added image on rectangle...and then push buttons...but i am not able to navigate........ so please help me out.......
  • Poor text antialiasing in my qml application (windows)

    2
    0 Votes
    2 Posts
    5k Views
    M
    See http://bugreports.qt.nokia.com/browse/QTBUG-16205
  • XmlListModel - XmlRole ( Navigating to parent item)

    3
    0 Votes
    3 Posts
    3k Views
    H
    Cool, thanks! I was trying to solve the same problem myself. Hartti
  • Is there a way to tell if an Item is running a State Transition?

    3
    0 Votes
    3 Posts
    2k Views
    M
    Hi Michael, Thanks for the suggestion! Here's a working example based on the information you provided. I'm trying to create a new Item called SmartTransition to encapsulate the ScriptAction and property setting. I'll post it if I figure something out. @ import Qt 4.7 Rectangle { id: root property bool inTransition: trans1.inTransition width: 640 height: 480 Text { anchors.centerIn: parent font.pixelSize: 32 text: "Running: " + inTransition } MouseArea { anchors.fill: parent onClicked: { if(root.state == "big") { root.state = "" } else { root.state = "big" } } } states: [ State { name: "big" PropertyChanges { target: root width: 800 height: 600 } } ] transitions: [ Transition { id: trans1 property bool inTransition: false SequentialAnimation { ScriptAction { script: { inTransition = true } } ParallelAnimation { PropertyAnimation { properties: "width"; duration: 2000 } PropertyAnimation { properties: "height"; duration: 3000 } } ScriptAction { script: { inTransition = false } } } } ] } @
  • [SOLVED]BorderImage misunderstanding

    5
    0 Votes
    5 Posts
    3k Views
    I
    OMG I've got it! Thank you guys! Obviously, it is a good practice to read what is written in documentation carefully instead of imagine own behaviour model as I did :) [quote]I don’t why pink part is not fully streched vertically.[/quote] It actually did. You may see a pink line at the left side.
  • 0 Votes
    2 Posts
    2k Views
    J
    Solved this myself again. The issue was that I accidentally compiled against Symbian^1 instead of ^3 and ^1 doesn't support OpenGL yet. This solves the case for me, however anyone targeting ^1 will still have this issue. See http://bugreports.qt.nokia.com/browse/QTMOBILITY-986
  • Row inside Row

    2
    0 Votes
    2 Posts
    2k Views
    M
    Well I solved my own problem... turns out the XPanel and the YPanel have to specifically declare width and height in them at the top level type since it's not computed automatically from the other elements that constitute the panel which do have specified width and height. Then the Row element knows how to place them correctly wrapping XPanel and YPanel
  • 0 Votes
    4 Posts
    4k Views
    S
    ...I should actually be banned and cast out for such question for not beeing able to look in help accordingly, shouldn't I? ...I still hope i won't be and I am happy that there are people like you patiently answering such questions... Of course: @ Connections { target: myModel onChangeCurrentIndex: { console.log("yo") categories.currentIndex = idx } } @ in c++ h/cpp @ signals: void changeCurrentIndex(int idx); ... emit changeCurrentIndex(1); @ this does the job. thakns+cheers simon:)
  • Particles

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Playing sounds with QML

    3
    0 Votes
    3 Posts
    4k Views
    L
    Well... I missed that one :) Sounds perfectly what I was looking for! Thanks!
  • Propagate mouse events to items bellow a MouseArea instance

    5
    0 Votes
    5 Posts
    8k Views
    I
    It is getting more clear. "This":http://bugreports.qt.nokia.com/browse/QTBUG-13007 bug report is more appropriate to the case. Obviously, until the bug(feature) is not fixed it should be documented because accepted property is confusing.
  • [SOLVED]Qt.createQmlComponent and qrc

    3
    0 Votes
    3 Posts
    2k Views
    I
    aalpert, thank you for the clarification.
  • [SOLVED]Negative height and ListView background

    11
    0 Votes
    11 Posts
    5k Views
    I
    mbrasser, both options are great! Thank you!
  • QML Page Loading/Navigating Question

    6
    0 Votes
    6 Posts
    6k Views
    I
    hi kyleplattner. hey i m using loader to navigate between pages..but can u tell me how to make transition while navigating.... regards imrrk
  • Using QtDeclarative

    4
    0 Votes
    4 Posts
    4k Views
    B
    You can get the latest Qt SDK from http://qt.nokia.com/downloads
  • [announce] QML Physics plugin

    3
    0 Votes
    3 Posts
    2k Views
    J
    Good point. Same as Bullet's. http://opensource.org/licenses/zlib-license.php
  • How to load javascript on loading of QML page

    5
    0 Votes
    5 Posts
    5k Views
    A
    imrrk, mbrasser link is right choice:)
  • Change text with PySide and qml, not working for me...

    7
    0 Votes
    7 Posts
    6k Views
    B
    Thank you, I have got it to work now :)