Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.8k Posts
  • SwipeView, how to restrict the user in swiping to advance to the next page?

    Unsolved
    3
    0 Votes
    3 Posts
    314 Views
    J.HilkJ
    @Sandebs the probably easiest solution would be to work with different models and/or with a proper c++ model that changes depending on selections your user makes. maybe you'll have to restore the currentIndex after the modelChanged signal is emitted. But I'm unsure about that
  • Qml video metaData returns undefined values

    Unsolved
    1
    0 Votes
    1 Posts
    170 Views
    No one has replied
  • PieChart with tooltip

    Unsolved pieseries qml
    1
    0 Votes
    1 Posts
    167 Views
    No one has replied
  • Accessing C++ object in QML

    Unsolved
    4
    0 Votes
    4 Posts
    379 Views
    R
    You can use Connections Connections { target: _chessModel //old syntax onInvalidMove: { } onValidMove: { } //new syntax function onInvalidMove(/*params*/) { } function onValidMove(/*params*/) { } }
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • how create dynamically Qml file(.qml) from c++ ?

    Solved
    3
    0 Votes
    3 Posts
    309 Views
    paghsaP
    @paghsa unfortunately I was looking for a hard answer finally i realized that i can use QAbstractItemModle along with my custom data i just make an interface and derived from it by some custom data and in qml i simply create a list view and give the correspond model to it.
  • How to Blend overlapping SVG

    Unsolved
    1
    0 Votes
    1 Posts
    297 Views
    No one has replied
  • Qml Blur Effects Disappeared!

    Unsolved
    2
    0 Votes
    2 Posts
    265 Views
    MarkkyboyM
    Nobody wants to click on spurious links that cause Chrome to defecate itself. Please post a screenshot of the effect you desire.
  • Connect to the signal from an object created by stackview.push in QML

    Unsolved
    17
    0 Votes
    17 Posts
    3k Views
    jeremy_kJ
    @James-A said in Connect to the signal from an object created by stackview.push in QML: @jeremy_k I updated the BatteryInfo.qml class as shown below [...] There is nothing with the id stackView here. It's too confusing for me to attempt to stitch together code from previous posts and infer missing portions. Please use examples that are both simple and complete. Remove everything that is not related to the problem at hand, and include everything that a reader would need to copy and paste to achieve the same result. I was getting the below error message qrc:/BatteryInfo.qml:7:5: QML Connections: Detected function "onChrgCntrlClicked" in Connections element. This is probably intended to be a signal handler but no signal of the target matches the name. qml: got a click qrc:/BatteryInfo.qml:11: ReferenceError: battery is not defined These are both generally straight forward errors. Is there a chrgCntrlClicked signal associated with stackView.currentItem? Is it a signal of a child item that needs to be propagated, or is there a typo? Setting the ignoreUnknownSignals property to allow for transitory states that lack the signal can help to silence irrelevant warnings. Is there a battery property or variable in scope? Ids in a Repeater or ListView delegate are not meaningful outside of a delegate instance. The example above has 3 instances of Battery called battery created in a Repeater. Which one is battery supposed to reference?
  • How to get access to QKeyEvent(not KeyEvent) in QML?

    Unsolved
    3
    0 Votes
    3 Posts
    339 Views
    MasterBLBM
    Sadly, that Keys are related to KeyEvent, which I can't use - well, unless it's possible in QML to inherit and alter a class like KeyEvent. But if I understand documentation correctly it is not.
  • Whats the QT way of creating this UI element?

    Unsolved
    2
    0 Votes
    2 Posts
    210 Views
    jeremy_kJ
    Depending on how it needs to scale, BorderImage might work. Other options include using an Image with an SVG source, a Canvas, implementing a C++ QQuickItem using the scene graph, etc. There is no one true Qt way, but rather a range of options that are better or worse suited to different requirements.
  • Connect custom Scrollbar and Flickable

    Unsolved
    1
    0 Votes
    1 Posts
    200 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    6
    0 Votes
    6 Posts
    98 Views
  • flickable item comming out of boundry

    Unsolved
    2
    0 Votes
    2 Posts
    242 Views
    Name already in useN
    Did you set the clip property of flickable to true? https://doc.qt.io/qt-5/qml-qtquick-item.html#clip-prop Flickable { clip: true Image { } }
  • Errors while loading Qt include files

    Solved
    5
    0 Votes
    5 Posts
    398 Views
    P
    You are right, it seems the problem come from my copy constructor which i can't do because of the inheritance of QObject. So i replaced it by QGadget and it works well (I also created a new project to begin on clean base). Thanks a lot !
  • Detecting press on TreeView

    Unsolved
    2
    0 Votes
    2 Posts
    283 Views
    J
    Bumping this, I have been working at this issue on and off for a few days now and still cannot find a clear solution. Do I just have to rip up the entirity of TreeView in order to get this to work?
  • TableView Snap to Row Feature / Implementation

    Unsolved
    2
    0 Votes
    2 Posts
    240 Views
    R
    As I have a "white" space between the rows here's one possible implementation: This is in a custom model: Q_INVOKABLE int alignRow(QObject* obj) { QQuickItemGrabResult *item = qobject_cast<QQuickItemGrabResult*>(obj); QImage qi(item->image()); int cnt = 0; while (cnt <= 130) { if(QColor(qi.pixelColor(1,1+cnt*2)).name() == "#000000") { break; } ++cnt; } return (cnt==200) ? 0 : 1+cnt*2; } With this on the QML side from a TableView: onMovementEnded: { eventLogView.grabToImage(function(result) { var shift = sqlELmodel.alignRow(result); eventLogView.contentY += shift; }) }
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    96 Views
    No one has replied
  • TableView: Anyone enabled something like snapMode: GridView.SnapToRow with a TableView

    Moved Unsolved
    3
    0 Votes
    3 Posts
    346 Views
    R
    Thanks, I will try that. @Moderator, please close this one as I will move to a more appropriate forum.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    26 Views
    No one has replied