Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • 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
    486 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.
  • QtQuickControls2 AbstractButton autoRepeat not working for me

    Unsolved
    4
    0 Votes
    4 Posts
    659 Views
    J.HilkJ
    @lynettar-0 great 👍 something like that happens to everyone, we don‘t like to admit it however ;) don‘t forget to set the topic to solved
  • C++ template member method callable from QML

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    ODБOïO
    hi @KroMignon thak you very much for the quick answer
  • Accepted audio file formats in QML programs for iOS

    Solved
    3
    0 Votes
    3 Posts
    401 Views
    tomyT
    @SGaist No I don't. The QSoundEffect documentation states exactly that it can play uncompressed audio format to achieve low latency. I meant for soundEffect. Thanks for your answer.
  • Why there is no "spacing" property for gridview ?

    Unsolved
    2
    0 Votes
    2 Posts
    735 Views
    JonBJ
    @divaindie Google: qml gridview spacing On this forum, although old doubtless still works: https://forum.qt.io/topic/19775/solved-qml-gridview-and-spacing-between-children Or: https://stackoverflow.com/questions/37313843/how-to-create-spacing-in-gridview cellWidth/Height: https://doc.qt.io/qt-5/qml-qtquick-gridview.html#cellWidth-prop, https://doc.qt.io/qt-5/qml-qtquick-gridview.html#cellHeight-prop
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Registering an Instantiable Object Type

    Solved
    9
    0 Votes
    9 Posts
    803 Views
    ODБOïO
    @J.Hilk Yes thank you again! i was reading this also : https://doc.qt.io/qt-5/qtqml-cppintegration-definetypes.html#receiving-notifications-for-object-initialization
  • simulating mouse area release event.

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    A
    i have raised a bug for this in Qt bug reporting system, https://bugreports.qt.io/browse/QTBUG-75196
  • Emscripten : ERROR_ON_UNDEFINED_SYMBOLS=0

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    I
    I edited my Makefile , included the install folder path like this : INCPATH = -I/root/.emscripten_ports/openssl/include -I/usr/local/Qt-5.12.2/mkspecs/wasm-emscripten -I/usr/local/Qt-5.12.2/include/QtQuickControls2 -I/usr/local/Qt-5.12.2/include/QtQml -I/usr/local/Qt-5.12.2/include/QtNetwork -I../qt/src/qt-everywhere-src-5.12.2/qtbase/include -I /home/izza/QcCore -I../qt/src/qt-everywhere-src-5.12.2/qtbase/include/QtGui -I../qt/src/build/qtbase/include -I../qt/src/build/qtbase/include/QtGui or else if someone is putting directly from bash ypu need to add the following -lQt5Qml -lQt5QuickControls2 -lQt5Network -lQt5Gui etc .. whatever modules are missing. and error isnow resolved.