Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • qml, play animations from start, playback, and run from arbitrary point

    Unsolved
    3
    0 Votes
    3 Posts
    325 Views
    H
    It will be easier to implement this in C++, not in qml. But the documentation says, that performance of QQuickPaintedItem is not good enough. Is there any other way to implement game scene in C++ and integrate it in QML?
  • qDebug() , qWarning(), qFatal(), qCritical

    Unsolved
    5
    0 Votes
    5 Posts
    19k Views
    JonBJ
    @ashajg @aha_1980 's logging by categories (I didn't know Qt had that) is exactly the kind of thing I do in my own code (in qtMessageHandler) to achieve logging-by-individual-categories. It helps a lot if you put something like this in as you develop: it's much better to be able to switch on info message for, say, just your database accesses rather than having to switch all info message for whole program on/off.
  • Problem with two fontloader in singleton

    Solved
    2
    0 Votes
    2 Posts
    608 Views
    M
    Ok. I found the problem. The solution is here: https://github.com/FortAwesome/Font-Awesome/issues/12787 BR martin
  • Problem with binding in QML

    Solved
    3
    0 Votes
    3 Posts
    390 Views
    M
    Hi, thank you for your help. That works. I have to set the init value. BR martin
  • MouseArea not getting released event when occluded

    Unsolved
    2
    0 Votes
    2 Posts
    276 Views
    Shrinidhi UpadhyayaS
    Hi @alcinos , if you give some sample code,it would help us to understand better and get to know what you want and where it is failing. Here is a sample code from what i have understood:- There are 2 Rectangles rect1 and rect2, rect2 is not visible,on pressing rect1 a timer is started which on triggered will make the rect2 visible and on releasing the mouse,you will get a console print that is "Rect1 Released" ``` Timer { id: dummyTimer interval: 2000 running: false onTriggered: { console.log("Timer Triggered") rect2.visible = true } } Rectangle { id: rect1 height: 100 width: 100 color: "red" anchors.centerIn: parent MouseArea { anchors.fill: parent onPressed: { console.log("Rect 1 Pressed") dummyTimer.start() } onReleased: { console.log("Rect 1 Released") } } } Rectangle { id: rect2 height: 100 width: 100 color: "green" anchors.centerIn: parent visible: false }
  • Scrolling issue with apple mouse (previously known as wired mighty mouse).

    Unsolved
    5
    0 Votes
    5 Posts
    642 Views
    S
    @J.Hilk It's working fine on Windows. Since this used to be a common mouse for Apple machines and it was discontinued in 2017, then how come it used to work back then? I'm asking you this because many of our users still use that mouse. So, we have to make this work for Apple mice on macOS.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • How to get resources and QML files to appear in Library>Resources / Library>QML Types

    Unsolved
    1
    0 Votes
    1 Posts
    185 Views
    No one has replied
  • Keep Android stuff up-to-date

    Unsolved
    2
    0 Votes
    2 Posts
    256 Views
    SGaistS
    Hi, First of all use the Android Getting Started guide from Qt's documentation to the get the versions of the dependency that you should use. Hunting for the latest and greatest at any price won't work for Android as each release of their NDK has a tendency to break the workflow of projects using it. Therefore you should use the guid already linked above. That will give you a development environment that is working.
  • Help Me Build Error

    Unsolved
    9
    1 Votes
    9 Posts
    745 Views
    mrjjM
    Hi The issues is most likely a missing DLL. Maybe not for the exe but for one of the other DLLS. If you have mutiple Qt installed, it might also be the reason. it took wrong ones. But you never answered if you use visual studio compielr or mingw.
  • Failed to get image from provider

    Unsolved
    19
    0 Votes
    19 Posts
    3k Views
    G
    @SGaist Thank you. I will do it that way.
  • How to color detailedText in MessageDialog, QML

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    tomyT
    @KillerSmath So no way to manipulate that text message. Thank you for your answer.
  • New QML errors thrown since 5.12.2

    Unsolved
    7
    1 Votes
    7 Posts
    5k Views
    fcarneyF
    I am seeing a similar error, but I cannot track it down. The error is cropping up in a private qml file: "Could not convert argument 2 at" "expression for index@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/Private/TreeViewItemDelegateLoader.qml:84" "Passing incompatible arguments to C++ functions from JavaScript is dangerous and deprecated." Is there a way to get a better stacktrace of this? Edit: Somehow I got a better trace: "Could not convert argument 2 at" "expression for index@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/Private/TreeViewItemDelegateLoader.qml:84" "insertColumn@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/Private/BasicTableView.qml:262" "addColumn@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/Private/BasicTableView.qml:236" "expression for onCompleted@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/Private/BasicTableView.qml:358" "__loadElement@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/StackView.qml:825" "__performTransition@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/StackView.qml:911" "push@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/StackView.qml:605" "expression for onLoginComplete@qrc:/startup.qml:96" "onAccepted@qrc:/Login.qml:209" "expression for onAccepted@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/TextField.qml:668" "Passing incompatible arguments to C++ functions from JavaScript is dangerous and deprecated." "This will throw a JavaScript TypeError in future releases of Qt!" The call that starts this: startup_stack.push({item: main_view, replace : true}); startup_stack is a StackView main_view is a Component with custom objects defined inside it I don't see a second argument here. Edit: Here is the offending line from the delegate file: readonly property var index: model ? model["_q_TreeView_ModelIndex"] : __treeModel.index(-1,-1,null) The error shows: expression for index@file:///opt/Qt/5.12.2/gcc_64/qml/QtQuick/Controls/Private/TreeViewItemDelegateLoader.qml:84 Well the second parameter is a constant provided by the Qt qml file. Does this mean we have a problem with a custom index somewhere? Or is Qt complaining about itself?
  • How to judge the current style?

    Unsolved
    2
    0 Votes
    2 Posts
    257 Views
    KillerSmathK
    Hello @zhangXianxiang and welcome to Qt Forum. Firstly, can you define it better? I suggest you to read the QtQuickControl2 Style documentation, it will explain how you can change the Style of your application. QtQuickControl2 - Using Styles Note: In this method, it's only changable before the qml file is loaded. If you are trying to change the style in runtime. Check out this StackOverflow Post: https://stackoverflow.com/questions/44951317/qml-qtquickcontrols2-change-style-properties-at-runtime
  • Qt Quick app and cmake

    Unsolved
    2
    0 Votes
    2 Posts
    290 Views
    SGaistS
    Hi and welcome to devnet, .qrc files are not loaded, they are processed so that the files linked in it are built in your application. So there's nothing special you have to do except referencing them properly in your .pro file.
  • Dealing with a Button and anchors

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    tomyT
    @KroMignon Yeah, right. I didn't see that close curly bracket! :) anchors.centerIn: parent } <= This Button { id: myButton
  • How can I draw an image into TextArea without HTML?

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    H
    @J.Hilk said in How can I draw an image into TextArea without HTML?: @raven-worx I didn‘t know there were classes one isn‘t supposed to modfy, look at that... Since this is in qml, you could simply add an Image element on top of your textarea, it will require a good amount of micro managment, aligning, show not to show logic etc. but should be possible. I'm now drawing image on top of textarea,but the performance is very bad(will cause the textedit blink). My solution is to draw image on QImage and then create an texturenode add into TextNode.but draw QImage is low performance,is a way can draw image to the texture directly by opengl?
  • qwidget can`t effect transparent background

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    SGaistS
    You have QQuickWidget that you can use to have a QtQuick interface in a widget application. However, I don't think it will solve your problem. From your code, I don't understand the use of QWidget for just the background of your GUI. Why not go full QtQuick ?
  • Native Android UI Elements in QML?

    Unsolved
    2
    0 Votes
    2 Posts
    485 Views
    T
    @Backflip9 I've never used the graphical Designer, but if you set the Quick Controls style to Material, you'll get widgets that look like native Android ones.
  • Linking to Qt offline documentation with Qdoc

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    raven-worxR
    @zhannum not that i am aware of https://doc.qt.io/qt-5/qtgui-qdocconf.html but i think its not really necessary, also its not documented it seems.