跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k 主題 77.8k 貼文
  • Unable to access Q_PROPERTY for QML_SINGLETON object.

    Solved
    3
    0 評價
    3 貼文
    276 瀏覽
    M
    Thank you very much. It works fine now.
  • mapping dynamic points on a map

    Solved qml qml map geocoordinate
    3
    0 評價
    3 貼文
    717 瀏覽
    K
    Finally found MapItemView which does what I am searching for.
  • 0 評價
    2 貼文
    339 瀏覽
    V
    Taken directly from the 5.15.8 docs for DisplaySettings: ========================================== Detailed Description There is no need to create an instance of this object. To use it, simply import the QtDeviceUtilities.DisplaySettings module. ========================================== But where is it? Why does it not exist for Windows? We have a commercial license. Where is this documented functionality? What is required to insure that the install of Qt that we are using includes the required library/module? In an operating room, setting the brightness is a very valuable capability. And, yes, I know what a singleton is, having created numerous singletons for this project.
  • 此主題已被刪除!

    Solved
    2
    0 評價
    2 貼文
    42 瀏覽
  • How to extend qml containers (Row or Column) in another file

    Solved row qtquick
    4
    0 評價
    4 貼文
    780 瀏覽
    GrecKoG
    It's documented in the QML Reference : https://doc.qt.io/qt-5/qtqml-syntax-objectattributes.html#property-attributes
  • 此主題已被刪除!

    Solved
    3
    0 評價
    3 貼文
    106 瀏覽
  • undefined reference to library function in Qtcreator

    Unsolved
    2
    0 評價
    2 貼文
    833 瀏覽
    jsulmJ
    @Narahara said in undefined reference to library function in Qtcreator: And I use a library developed by Visual Studio 201 Is this library a C++ library? If so then you have to use compiler from Visual Studio 2013 to build your app, because you can't mix binaries compiled with different compilers.
  • project.exe does not launch

    Solved qtquick qml windows 10
    3
    1 評價
    3 貼文
    894 瀏覽
    J.HilkJ
    @RLocksley said in project.exe does not launch: windeployqt project.exe if that is the whole command you used, that you missed the --qmldir parameter https://doc.qt.io/qt-5/windows-deployment.html
  • Zooming OrthogonalCamera in QtQuick 3D

    Unsolved
    1
    0 評價
    1 貼文
    248 瀏覽
    尚無回覆
  • Use QZXing in qml

    Solved
    13
    0 評價
    13 貼文
    6k 瀏覽
    lukas_kosinskiL
    @ekkescorner I worked on that and now it supports much more formats. Currently it's a PR opened, but it should be soon merged: https://github.com/scytheStudio/SCodes/pull/11 Sorry that I add the comment to a quite old post. I simply wanted people to know it and not be misled.
  • Drag and Drop to desktop or file manager

    Unsolved
    2
    0 評價
    2 貼文
    563 瀏覽
    S
    Replying here just because it's the first hit on google for Drag.Automatic: there is an answer to this question here: https://stackoverflow.com/questions/24532317/new-drag-and-drop-mechanism-does-not-work-as-expected-in-qt-quick-qt-5-3. In short, you should replace Drag.active: mouseArea.drag.active by property bool dragActive: mouseArea.drag.active onDragActiveChanged: { if (dragActive) { Drag.start(); } else { Drag.drop(); } } More details in the SO post, apparently you can see the different code flows in the QQuickDrag code. Note that Drag.Automatic does work as expected when you use a DragHandler, just not when you use a MouseArea.
  • How to create a QML ListModel from a C++ structure ?

    Solved
    8
    0 評價
    8 貼文
    2k 瀏覽
    fcarneyF
    If you are using this structure in other code that you don't want to change. Then I would serialize and deserialize the list. It really depends upon how interactive you want it to be. Are you planning on having the changes update in the structure based upon actions by the user? In that case I would go for a model that allows things to be updated and immediately changed in the structure. If you want to just display and update the whole thing at once you can get by using the serialize method. QML ListModel's accept javascript structures: {name: "year", value: 22} You can build this value as a QVariantList with each entry being QVariantMap. Then return QVariantList to QML. Or you can emit a QVariantMap for each member. You won't be able to get around the tedious work this involves. No matter how you do this it will a lot of copy, paste, and edit. If you are thinking of changing how you store this in your program you could store the data in a way that is easier to serialize.
  • 此主題已被刪除!

    Unsolved
    1
    0 評價
    1 貼文
    30 瀏覽
    尚無回覆
  • How to auto change the width of rectangle under Repeater

    Solved
    3
    0 評價
    3 貼文
    889 瀏覽
    J
    @fcarney This helped me to fix the problem
  • gif uses a lot of memory, qml

    Unsolved
    6
    0 評價
    6 貼文
    634 瀏覽
    Q
    @jsulm i used other gifs and any gif increments app size at least 100 mb i wanna use gif just for icon of app (just one place)
  • Change Map language in QML Map element

    Unsolved
    2
    0 評價
    2 貼文
    312 瀏覽
    M
    @Alisa said in Change Map language in QML Map element: MapParameter { type: "layout" property var layer: "country-label" property var textField: ["get", "name_de"] } Hi Have you found the sollution? Best Marek
  • How to use ItemSelectionModel with TableView

    Unsolved
    2
    0 評價
    2 貼文
    804 瀏覽
    GrecKoG
    @ocgltd said in How to use ItemSelectionModel with TableView: ItemSelectionModel.select | ItemSelectionModel.current It should be ItemSelectionModel.Select | ItemSelectionModel.Current
  • Q_PROPERTY typedef

    Solved
    2
    0 評價
    2 貼文
    416 瀏覽
    kshegunovK
    @vinci said in Q_PROPERTY typedef: Is the documentation on this out of date? What exactly are "type comparisons" in this context? Probably not out of date. I'd speculate it simply isn't telling the whole story. You can test this: Make your own typedef and do the Q_DECLARE_METATYPE and qRegisterMetatype stuff. Then try to use it as a type in the property. I suspect it should work. E.g. (split and reorder properly): namespace Test { Q_NAMESPACE enum TestEnum { MyValue }; Q_ENUM_NS(TestEnum) } using TestEnum = Test::TestEnum; class Bar : public QObject { Q_OBJECT Q_PROPERTY(TestEnum enum READ enum WRITE setEnum NOTIFY enumChanged) // ... code }; int main( ...) { qRegisterMetaType<TestEnum>("TestEnum"); // Do the QML init and such } @vinci said in Q_PROPERTY typedef: Yet types like QVariantMap are themself typedefs. E.g. QVariantMap is defined like this: Variants are very special. What exactly are "type comparisons" in this context? As in whether TestEnum is convertible to int, or other enums, or can be streamed to a binary buffer, etc. The metatype reflection stuff basically.
  • Qt Charts: StackedBarSeries with DateTimeAxis

    Unsolved
    2
    2 評價
    2 貼文
    625 瀏覽
    D
    Were you able to figure this out? I have the same issue.
  • Having the same issue.

    Unsolved
    1
    0 評價
    1 貼文
    132 瀏覽
    尚無回覆