Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • Get paintedWidth/Height for QML Video

    1
    0 Votes
    1 Posts
    553 Views
    No one has replied
  • List View Zooming

    2
    0 Votes
    2 Posts
    1k Views
    D
    Hmm, i think as main container is "StackView":http://qt-project.org/doc/qt-5/qml-qtquick-controls-stackview.html a good element. For the pages use a "flickable container":http://qt-project.org/doc/qt-5/qml-qtquick-flickable.html with a child item to render the content. Change the size of the child item for zooming should have a direct effect to the flickable element for scrolling.
  • Button Click Signal to make a pop- up window

    3
    0 Votes
    3 Posts
    5k Views
    H
    Yes now I understand, thank you.
  • How to simulate Home Key pressing in Android

    1
    0 Votes
    1 Posts
    937 Views
    No one has replied
  • Camera preview image is always the same

    4
    0 Votes
    4 Posts
    2k Views
    M
    any help on this issue ? I've submitted a bug, but no news as well on that site : https://bugreports.qt-project.org/browse/QTBUG-41442
  • Using rainyday.js in QtQuick app

    2
    0 Votes
    2 Posts
    672 Views
    p3c0P
    Hi, I don't think so it could be used. The first major obstruction here would be use of window object which is used in that js. Check "this":http://qt-project.org/doc/qt-5/qtqml-javascript-hostenvironment.html for more details.
  • [SOLVED] Object rotating twice on Transition

    7
    0 Votes
    7 Posts
    2k Views
    V
    That's exactly it, works perfectly now. Thank you. I added the code below in case someone has the same problem: @import QtQuick 2.2 import QtQuick.Window 2.1 Window { visible: true width: 360 height: 360 MouseArea { id: mouseArea anchors.fill: parent onClicked: { rect.state = rect.state === "clicked" ? "" : "clicked"; } } Rectangle { id: rect width: 50 height: 50 color: "blue" anchors.centerIn: parent function getRandom() { var rand = Math.floor(Math.random() * 360) + 1; console.log("Random: " + rand); return rand; } states: [ State { name: "clicked" PropertyChanges { target: rect explicit: true rotation: getRandom() } } ] transitions: Transition { to: "clicked" RotationAnimation { target: rect duration: 500 } } } } @
  • Delete Images from Stored Path in qml

    4
    0 Votes
    4 Posts
    1k Views
    p3c0P
    Well, atleast from what all i have explored i found no way.
  • Message Dialog error on SetGeometry.

    4
    0 Votes
    4 Posts
    2k Views
    T
    Hi, any luck on this? I'm facing the same issue using Qt 5.3.2. The same code had no problem in Qt 5.2.1, but now the dialog window seems to hang on Windows. If I move the window a bit, then it suddenly refreshes, and I may click the buttons. On 5.2.1, the window looked much nicer as well. I have searched, but could not find a bugreport mentioning this.
  • [solved]QtQuick need something to work?

    12
    0 Votes
    12 Posts
    6k Views
    C
    @harshit_smart could you fix it? I have the same problem...!
  • [SOLVED] Qt Quick Application: empty window

    8
    0 Votes
    8 Posts
    7k Views
    R
    The latest versions of Qt Creator take care of the original problem stated here because the main.qml file is put inside a qml.qrc resource file by default. Did yours do this? If not you might not be on the latest (right now 5.2.3 - but its been doing this for a while). Other than that I would suggest taking a look at the Projects mode and switch to the Run tab and see if possibly something got mucked up on the Working Directory line. It should point to that same folder where you are manually double-clicking.
  • [solved] script in property

    5
    0 Votes
    5 Posts
    1k Views
    R
    I think it would be cleaner (just an opinion) to use a couple of functions to populate the ListModel. You would of course need to add a line to fillScreenListModel() for every additional item you added in your case statement. @ function makeObject(roleName, value) { return {"name": roleName, "info": value} } function fillScreenListModel() { var dataArray = [], i=0 dataArray[i++] = makeObject("Screen width",Screen.width) dataArray[i++] = makeObject("Screen height",Screen.height) dataArray[i] = makeObject("Pixel density",Math.floor(Screen.logicalPixelDensity*100)/100) //Now move each object into the ListModel dataArray.forEach(function(element){infoModel.append(element)}) }@ Then your ListModel could look like this: @ ListModel { id: infoModel Component.onCompleted: fillScreenListModel() }@ If you want to format pixelDensity as a string using toFixed(2), then add toString() to the other numbers so that all the info roles are strings.
  • [SOLVED]How to control refreshing qml view?

    12
    0 Votes
    12 Posts
    2k Views
    p3c0P
    Ok. You're Welcome :) Please mark the post as solved.
  • How to delete qml object from Qt slot?

    2
    0 Votes
    2 Posts
    883 Views
    p3c0P
    Hi Pass the parent object to QQuickView and it will be deleted on quit.
  • [SOLVED] Load new View

    8
    0 Votes
    8 Posts
    3k Views
    M
    Thanks, it works ;-) the z values did the trick! @ ApplicationWindow { id: applicationWindow1 visible: true width: 1200 height: 1920 title: qsTr("whatsOn") Loader { id: pageLoader anchors.fill: parent z: 1 } // signal qmlSignal(string msg) menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { text: qsTr("Verbindung"); onTriggered: pageLoader.source = "MyItem.qml"; } MenuSeparator {} MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } } } Timeline{z: 0} } @
  • 0 Votes
    3 Posts
    10k Views
    G
    I see. That's not exactly what I wanted, as it is not going to work starting program with @Component.onCompleted:@ Apparently XMLHttpRequest can read local files directly when they are included in resources and since I'm updating that file with QFile, then I have to read it with QFile as well. The question was raised, because "http://qmlbook.org/ch11/index.html#local-files":http://qmlbook.org/ch11/index.html#local-files and other examples doesn't mention this restriction regarding location of these files.
  • Load qml-files inside a folder as tabs in a TabView

    5
    0 Votes
    5 Posts
    1k Views
    D
    Please add [SOLVED] to all your solved threads because for other users it's a nice help to see if a thread is solved.
  • [SOLVED] clearing FrameBuffer

    2
    0 Votes
    2 Posts
    2k Views
    D
    OK, i solved the problem. The magical part is this: @ this->_fbo->bind(); glClear(GL_COLOR_BUFFER_BIT); this->_fbo->release(); @
  • QQuickView not active before being clicked once

    8
    0 Votes
    8 Posts
    2k Views
    P
    No, raise() does not help. I´ve tried lots of things on QQuickItem , setFocus, forceActiveFocus, setAcceptedMouseButtons...and even sending MouseButtonPress/Release events. But nothing works... Thans for your help.
  • Unable to change parent and child window Z order after calling loader

    3
    0 Votes
    3 Posts
    3k Views
    R
    I think what happens is once you reload, the main window becomes active. Then calling raise and lower is raising and lower the main window (and its child) relative to the other windows in the OS. I just experimented and found that changing your onTopChildChanged handler as follows results in the desired behavior (at least under windows 7): @ onChildOnTopChanged: { if (childOnTop) { winNew.requestActivate() winNew.raise(); } else { winNew.requestActivate() winNew.lower(); } }@