Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • Opengl underlay

    7
    0 Votes
    7 Posts
    3k Views
    sajis997S
    It will be fun then. Here goes the link to the repository: https://sajis997@bitbucket.org/sajis997/teapottessellationqt.git I am using Qt 5.2 with QtCreator 3.0.1 at ubuntu 14.04 at my end. Thanks
  • 0 Votes
    1 Posts
    453 Views
    No one has replied
  • [SOLVED]binding from C++: value can not updated automatically

    5
    0 Votes
    5 Posts
    1k Views
    R
    I must admit I'm not a big fan of the MEMBER decorator. You might be interested in my AUTO_PROPERTY macro. I wrote up my reasoning and links to the macro code in "this blog post":http://syncor.blogspot.com/2014/11/qt-auto-property.html. In addition to keeping your private implementation details private, it writes the notify signal for you.
  • Overlaying elements in a ListView

    2
    0 Votes
    2 Posts
    790 Views
    S
    I think I have a fix (code): @ import QtQuick 2.2 import QtQuick.Layouts 1.0 import QtQuick.Controls 1.2 import QtQuick.Window 2.2 Window { width: 300 height: 600 visible: true Component { id: rect Rectangle { width: view.width height: 30 color: "blue" y: 20*30+15 z: 2 } } ScrollView { id: scroll clip: true anchors.fill: parent ListView { id: view model: 100 Component.onCompleted: { rect.createObject(view.contentItem) } delegate: Rectangle { height: 30 width: view.width border.color: "black" Label { text: index z: 3 } } } } } @ Demo: !https://i.imgur.com/WSlGpjx.gif(demo)!
  • TextEdit with Arabic chars and img tag

    2
    0 Votes
    2 Posts
    957 Views
    M
    any idea? when i add image this pic begin draw from left to right, i think issue somewhere there. someone know how to say qml (html?) to draw img from right to left ?
  • [SOLVED]C++ slot in QML

    5
    0 Votes
    5 Posts
    2k Views
    E
    Oh, yes, it is really helped! Thanks a lot!
  • Bug? Embedded Menu must be nested in Item.

    1
    1 Votes
    1 Posts
    747 Views
    No one has replied
  • [Solved] New .ui.qml template

    2
    0 Votes
    2 Posts
    1k Views
    T
    My mistake, when presented with the "MyFileForm" automatic name, I deleted "Form". Obviously the correct thing to do is keep that suffix, then the use of these files is obvious.
  • 0 Votes
    1 Posts
    517 Views
    No one has replied
  • Make button background visible on click

    3
    0 Votes
    3 Posts
    1k Views
    R
    You could put the image in a rectangle and change the rectangle background color or you could use two images and just swap them. There would be lots of ways. Without more information it's hard to know what problem you're having and what you've already tried.
  • Access model in another qml component

    29
    0 Votes
    29 Posts
    7k Views
    M
    I fixed this with JavaScript, probably not this best way but it works for me... TimleineVertical.qml: @ Row { id: deviceRow spacing: 20 Repeater { id: deviceRepeater model: attributes Button {id: deviceImageButton; anchors.verticalCenter: parent.verticalCenter; iconSource: deviceImage; width: 100; height: 100; onClicked: setVisibleDetail(detailRectangle, deviceItem), setTest(euro, kwh, time, euroText, kwhText, timeText) style: TimelineDeviceButtonStyle{} } } @ JavaScript to set the values from the model for the text element: @ function setTest(euro, kwh, time, euroText, kwhText, timeText) { euroText.text = euro; kwhText.text = kwh; timeText.text = time; } @ Text element: @ Text { id: euroText anchors.top: parent.top anchors.topMargin: 30 anchors.left: parent.left anchors.leftMargin: 20 font.pixelSize: 12 } @
  • Android Newbie: On Samsung Note 3 KitKat (4.4.2)

    5
    0 Votes
    5 Posts
    2k Views
    idlefrogI
    I am using: NDK: r10d (64-bit) SDK: r24
  • Slowing down the speed of the Transition

    5
    0 Votes
    5 Posts
    1k Views
    sierdzioS
    Create a state definition for your default state and make sure you set the position well there. By default, your image is anchored, so when you change the state to hideLogo, that anchor is broken. An alternative would be to define hideLogo transition as AnchorAnimation instead of NumberAnimation. You can also look up reversible property of Transition - "link":http://doc.qt.io/qt-5/qml-qtquick-transition.html#reversible-prop. And restoreEntryValues in ProeprtyChanges - "link":http://doc.qt.io/qt-5/qml-qtquick-propertychanges.html#restoreEntryValues-prop.
  • 0 Votes
    7 Posts
    6k Views
    M
    I can not get the code to work. Maybe the code of uploadimage.cpp is missing? Anybody can help me? Thanks in advance
  • Import QtQuick.Enterprise.Controls 1.2 [solved]

    4
    0 Votes
    4 Posts
    3k Views
    P
    Thx. Thought I read something on one of the "News" blurb pages that implied the enterprise controls were included in the indie license. Link above is pretty clear. Sigh. Off to "re-invent the wheel land". ;-)
  • Get QPixmap from Image Item in C++

    7
    0 Votes
    7 Posts
    3k Views
    U
    bq. I cannot use that method because I’m writing a library, so the functionality that I need will be used by the users of the library not by myself. You probably can put it into the library, i.e. the plugin, with: @void QQmlExtensionPlugin::​initializeEngine(QQmlEngine * engine, const char * uri)@ Just register the image provider with the engine in that function. There is nothing preventing you from creating a pixmap from a file in qrc, but it would be quite limiting only being able to use images packed in the resource file.
  • Camera

    2
    0 Votes
    2 Posts
    652 Views
    SGaistS
    Hi and welcome to devnet, You should add what OS/Qt version you are running and which board your using
  • How to replace text with picture

    2
    0 Votes
    2 Posts
    567 Views
    A
    solved it by handling from model. added new role (bool) to display text or image.
  • 0 Votes
    7 Posts
    5k Views
    T
    Thank you for your answer!!! You suggestion does not work for me. I'm using Qt 5.3.2. And I've found another way to fix it) The problem was caused in [code] flickable.contentHeight - flickable.height [/code] As my flickable element that is passed to the scrollbar is a child element of Item with its own height and width, I made an additional [code] property int flick_width; [/code] in my ScrollBar.qml. So I've just replaced flickable.height by flick_width.
  • Connections to attached signal

    3
    0 Votes
    3 Posts
    918 Views
    P
    Dear JKSH! Thanks for your advice! I did the same for now and it works. I develop some application framework, and it is good for me to catch this signal directly, because in other way I have to ask users to implement that custom signal. In my situation, we control the base object, "MyWindow". So I put that custom signal there. It looks almost same as onCompleted in MyWindow user's descendant.