跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • QML_NAMED_ELEMENT and QML_IMPORT_NAME in VC'2019

    Solved
    10
    0 評價
    10 貼文
    2k 瀏覽
    raven-worxR
    FYI: since Qt 6.2 you can use the qt6_add_qml_module() method in cmake.
  • Capslock off on virtual keyboard for specific input ?

    Solved
    2
    0 評價
    2 貼文
    390 瀏覽
    C
    Found it on stackoverflow, sharing it here so it can help others. There is a property on Textfield called inputMethodHints that can change the default behaviour of the virtual keyboard. For example : inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText
  • c++ enum in QML print as string

    Solved
    5
    1 評價
    5 貼文
    904 瀏覽
    V
    @sierdzio sure, I mean in QML :)
  • Qt 6.1 Quick DragHandler Reporting Wrong Coordinates using TouchScreen Input

    Unsolved
    4
    0 評價
    4 貼文
    499 瀏覽
    Q
    @RainerG I have not reported this as a bug. It will be great if you could report it for me. It still occurs on Qt 6.2. The phenomenon is exactly as you have described. Best Regards
  • How to change Shape color

    Unsolved
    6
    0 評價
    6 貼文
    931 瀏覽
    S
    @govind_ashrit Thank you for your reply. Sorry I didn't mention it but my sweepAngle changing dynamically. The value coming from a C++ script. When I try your example the shapes rotating independently. So what I want is when first shape reaching last point other colored shape starting rotate. Basically like this. I try the gradient but didn't work for me. [image: 6y6f7whmzfs31.gif]
  • Qt Quick QtCharts Module

    Unsolved
    9
    0 評價
    9 貼文
    1k 瀏覽
    eyllanescE
    @Mo_22 That is a QtCreator bug, forget it.
  • QML Export as PDF-For Report

    Unsolved
    2
    0 評價
    2 貼文
    467 瀏覽
    SGaistS
    Hi, QPixmap does not have that method. However your "window" object does.
  • Export as PDF UI Scene

    Unsolved
    8
    0 評價
    8 貼文
    1k 瀏覽
    T
    @SGaist What is explained here is not clear enough. There is no information about header files, any of the structures to #include, and that's why I'm getting so many errors. I wish you could elaborate a little more on this link. I'm sure it's very easy for you. However, as a beginner, its very difficult.
  • Gauge strange margin and labels problems

    Unsolved gauge scaling margin label
    1
    0 評價
    1 貼文
    279 瀏覽
    尚無回覆
  • Q_INVOKABLE funciton returning null when called in QML 'onDestruction'

    Solved
    5
    0 評價
    5 貼文
    1k 瀏覽
    jeremy_kJ
    @Circuits said in Q_INVOKABLE funciton returning null when called in QML 'onDestruction': Is there a way to test if the object itself is null from the QML? The test is the same as for any variable. if (! obj) tests for null or undefined. Using an explicit !== null also works. Presumably the object in this case is this, but getting into the situation where this === null is something you probably want to avoid. I have a workaround. I created two states: open, closed and a property: property string prevState: "" whenever the state changes I set the previous state to be the current state that way I can identify when the state is changing from open to closed and in that instance I can call the methods. However, while this works it doesn't explain how to deal with the QMl calling an object which is null. Without code, I can't suggest anything better than if (this) { do_something(); }, which looks like a work around for a deeper problem.
  • QML QDoc grouping property into one explanation

    Unsolved qdoc qml qt quick group propertie
    4
    0 評價
    4 貼文
    825 瀏覽
    T
    Still looking for a solution
  • Calling C++ slot from Qml signal

    Solved
    5
    0 評價
    5 貼文
    2k 瀏覽
    A
    Hey @sierdzio, @sierdzio said in Calling C++ slot from Qml signal: So you are using QQmlEngine? It was not in your original snippet so I didn't use it either. Because I didn't have any idea that we can have a QML project without using the QML engine (I've just created the QML project with QtCreator). In such case, you can instantiate the C++ class in QML if you register it first with qmlRegisterType > methods. It's a more advanced technique so I didn't mention it before. There are also a few other > ways to achieve this. But in general don't worry about root context properties - they work fast and > are easy to set up. And Qt Creator's code model understands them well, too. Ok I'll go with the root context property for now and I'll keep in my mind the qmlRegisterType. Thank you very much for your answers!
  • TabBar : Modify the TabButton Mouse Area

    Unsolved
    1
    0 評價
    1 貼文
    185 瀏覽
    尚無回覆
  • How to connect to a device via on bluetooth by using QML?

    Unsolved
    1
    0 評價
    1 貼文
    424 瀏覽
    尚無回覆
  • Missing Sort Indicators for Table Columns

    Unsolved qml tableview
    1
    0 評價
    1 貼文
    397 瀏覽
    尚無回覆
  • Open specific Folder in FileDialog

    Unsolved
    3
    0 評價
    3 貼文
    477 瀏覽
    J
    @IntruderExcluder Thanks for your reply. Actually I am just using the pictures folder to open a Json file which I stored there before. I used the pictures folder because it's one of the standart paths which are writable. So my goal is selecting a specific folder. But I did not know that I can start Activities or Intents from c++. So if I manage to achieve it with native Android, can I just include the Activity in the code? Edit: Related to this stackoverflow answer there is no Intent which opens a particular folder in android. https://stackoverflow.com/questions/68224141/how-do-i-open-a-file-picker-at-the-applications-files-directory
  • how to access properties in a delegate

    Unsolved qt 5.7 qml delegate qt quick
    4
    0 評價
    4 貼文
    869 瀏覽
    B
    @vinaygopal "what if i want to access the visibility or a property i have defined in the delegate?" There are multiple instances of your delegate, corresponding to the part of the model being displayed. Which instance do you want the property from? If it's a common property that is not specific to a single instance, then the same answer applies - factor it out to the table level and use it in the delegate. If it is a property specific to a delegate instance you are interested in, how do you specify which delegate? Does the data actually belong to the model? What is it that you are trying to achieve?
  • QtQuickControls FileDialog Automation

    Unsolved
    1
    0 評價
    1 貼文
    213 瀏覽
    尚無回覆
  • 此主題已被刪除!

    Unsolved
    1
    0 評價
    1 貼文
    22 瀏覽
    尚無回覆
  • Sort by Clicking on Column Headers in QML TableView

    Unsolved qml qtableview c++
    1
    0 評價
    1 貼文
    653 瀏覽
    尚無回覆