Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Using Flickable::resizeContent with mouse

    2
    0 Votes
    2 Posts
    1k Views
    O
    bq. Resizes the content to width x height about center. If you want to go ahead and keep it's center-point: That would be for x-coordinate in center: flick.x+(flick.width/2) and for y-coordinate: flick.y+(flick.height/2). Also you could pass it's originX and originY.
  • Change delegate properties afterwards.

    4
    0 Votes
    4 Posts
    1k Views
    O
    [quote author="Schneidi" date="1392378277"]Hey onek24, ok with this approach I access the properties of the model right ?[/quote] Yes, you access the model OR you could access the item/children by itself. I provided the code for that above, too. But keep in mind: QML delegates are construkted and destroyed dynamically. Only visible delegates are existent. [quote author="Schneidi" date="1392378277"] Is there also a way to change the height property of the delegate Item {} like the one above ? @height: 50 //this propertie must be changed dynamically@ Or do I have to pass the height via the model and change the height in the model ?[/quote] You can change the height of it using: @menu_model.get(i).height = 50@
  • QML 2 performance is worse than QML 1?

    1
    0 Votes
    1 Posts
    958 Views
    No one has replied
  • Orientation is not detected in Android

    1
    0 Votes
    1 Posts
    532 Views
    No one has replied
  • How I can draw shadows on the QQuickPaintedItem?

    1
    0 Votes
    1 Posts
    813 Views
    No one has replied
  • Accessing model roles in qml

    1
    0 Votes
    1 Posts
    556 Views
    No one has replied
  • QtLocation fails to compile (latest stable branch)

    14
    0 Votes
    14 Posts
    5k Views
    JKSHJ
    Great! Happy coding :)
  • Keep GridView element in front of others during animation

    7
    0 Votes
    7 Posts
    2k Views
    E
    Thanks for the insight Jens! Very interesting :)
  • Need technical suggestion on GUI creation & QML uses

    9
    0 Votes
    9 Posts
    3k Views
    Z
    Hello, Thanks for the kind words onek24 :) @Prashant: no videos yet, but a there's a few screenshots on the website and you're free to play with the application to get a better sense of some of the things you can do with Qml. Pillow
  • How can I view PDF files on QML (QtQuick 2) ?

    2
    0 Votes
    2 Posts
    1k Views
    D
    Try use a "Poppler library":http://poppler.freedesktop.org/
  • 0 Votes
    3 Posts
    973 Views
    D
    I actually did get it to work by handling the up and down key events. Problem is that if you handle the key event then that bypasses the normal behavior of list navigation by the keys so you have to call the incrementCurrentIndex or decrementCurrentIndex when your done. It works, but I think I like your idea a little better. Thanks! Brian
  • Qcustomplot

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QML Listview scrolling error when run on platform eglfs

    1
    0 Votes
    1 Posts
    913 Views
    No one has replied
  • [Solved] How to add a Close Button in TabView Tabs

    4
    0 Votes
    4 Posts
    5k Views
    J
    There is nothing really special about the button so I am curious what the problem was. This is how the code might look with a regular mouse area: @ import QtQuick 2.0 import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.1 Item { width: 400 height: 300 TabView { id: tabView anchors.fill: parent anchors.margins: 10 Tab { title: "first" } Tab { title: "second" } Tab { title: "third" } style: TabViewStyle { property color frameColor: "#999" property color fillColor: "#eee" frameOverlap: 1 frame: Rectangle { color: "#eee" border.color: frameColor } tab: Rectangle { color: styleData.selected ? fillColor : frameColor implicitWidth: Math.max(text.width + 24, 80) implicitHeight: 20 Rectangle { height: 1 ; width: parent.width ; color: frameColor} Rectangle { height: parent.height ; width: 1; color: frameColor} Rectangle { x: parent.width -1; height: parent.height ; width: 1; color: frameColor} Text { id: text anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: 6 text: styleData.title color: styleData.selected ? "black" : "white" } Rectangle { anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.rightMargin: 4 implicitWidth: 16 implicitHeight: 16 radius: width/2 color: control.hovered ? "#eee": "#ccc" border.color: "gray" Text {text: "X" ; anchors.centerIn: parent ; color: "gray"} MouseArea { anchors.fill: parent onClicked: tabView.removeTab(styleData.index) } } } } } } @
  • MessageDialog is triggering signals twice

    6
    0 Votes
    6 Posts
    2k Views
    D
    Yes, it is working fine now for me as well. I've updated to Qt5.2.1
  • How do I scroll a ListView when an image is clicked

    12
    0 Votes
    12 Posts
    3k Views
    M
    Solved !! @ listviewObjectPalette.positionViewAtIndex(lastVisibleItem + 1, ListView.Visible) listviewObjectPalette.currentIndex = lastVisibleItem + 1; @ Its so freaking fast now, the list is a blurrrr !! Thanks to Martinj : http://qt-project.org/forums/viewreply/15600/
  • Tree model Table view

    4
    0 Votes
    4 Posts
    1k Views
    E
    Thanks, Jens i'm looking something like that. I want to you tree model with list view in qml.
  • [SOLVED] QML component inheritance - problem

    5
    0 Votes
    5 Posts
    2k Views
    S
    I resolved problem by using loader class. @ Rectangle { // code Viewport { // code Loader { id: robotLoader objectName: "robotLoader" property string robotQmlFile: "" source: robotLoader.robotQmlFile } } } @ By this code i can load dynamically my class into desired Viewport.
  • QtQuick 2.0 scene on top of Direct3D scene

    1
    0 Votes
    1 Posts
    907 Views
    No one has replied
  • Best way to plot x and y

    2
    0 Votes
    2 Posts
    945 Views
    B
    I used Qwt for this: http://qwt.sourceforge.net/ There is also this one: http://www.qcustomplot.com/ , but I never tried it. Seems a bit more like what you want :) Actually, I found them via google "qt plot" , ... [btw: why QtQuick forum?]