跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k 主題 77.8k 貼文
  • Issue in Module not installed

    Unsolved qtdesignstudio qtcreator qt6.2
    1
    0 評價
    1 貼文
    719 瀏覽
    尚無回覆
  • Converting QMLProject to Pro issues, questions

    Unsolved
    1
    0 評價
    1 貼文
    210 瀏覽
    尚無回覆
  • Issue with listview that resets when scrolling

    Solved
    3
    0 評價
    3 貼文
    329 瀏覽
    M
    @sonicss found my issue, did not know I had to store the dynamic data I put into the listview. When i stored it in the model it survived scrolling.
  • QML. ChartView. Is it possible to increase distance between the axe and values?

    Unsolved
    3
    0 評價
    3 貼文
    291 瀏覽
    L
    @sonicss said in QML. ChartView. Is it possible to increase distance between the axe and values?: range You could add a "<br>" to the label format, or rotate the label: ValueAxis { // [...] labelFormat: "<br>%.0f" } ValueAxis { // [...] labelsAngle: -60 }
  • Native application window inside QML

    Unsolved
    1
    0 評價
    1 貼文
    217 瀏覽
    尚無回覆
  • How to add a color on TableView and keep previous color as I select a row.

    Solved
    7
    0 評價
    7 貼文
    2k 瀏覽
    M
    @lemons  Thank you so much ! This is the best solution !
  • How to Push multiple Values to an Array in a single time

    Solved
    5
    0 評價
    5 貼文
    527 瀏覽
    P
    @lemons Thanks again and Sorry for troubling you again I understood, how to store the key value pair in the list using json object. But, one thing that is disturbing in my mind is, if I want to push 3 or 4 arguments to the list like below ({"A001", 1, "Item1"}, {"A002", 2, "Item2"}) How can I do this ? I know these are the basic things in js, but can't figure out the solution
  • Is it possible to load a QML module at runtime with a static-compiled Qt Application?

    Unsolved
    1
    0 評價
    1 貼文
    487 瀏覽
    尚無回覆
  • How to use custom components in QML Repeaters

    Unsolved
    6
    0 評價
    6 貼文
    1k 瀏覽
    J.HilkJ
    @Markkyboy [image: 67c5e653-128f-457b-b056-3392705884c9.png] and if you actually adjust the sizes a bit, one also sees the 2nd component [image: f21066b7-ca4e-49f4-a3e2-28d6bd1e88fd.png] like I said, works perfectly fine. But admittedly I should have used the correct screenshot.
  • Memory leak in StackView.replace?!

    Unsolved
    5
    0 評價
    5 貼文
    489 瀏覽
    A
    @J-Hilk no, we don't have an initialComponent set.
  • Create a MessageDialog using Qt Creator

    Unsolved
    3
    0 評價
    3 貼文
    390 瀏覽
    Q
    @JKSH Try "import Qt.labs.platform 1.1" (version number only needed in Qt 5, not Qt 6) instead of "import QtQuick.Dialogs 1.1". Thanks, it worked, but why do I need to import Qt.labs.platform 1.1 while the project is not of Qt 6 but Qt 5? The second question about that part is that, while the project works, but Qt Creator 6 doesn't recognize the element and draws a red line under it! Up to know, I guess Qt5 was better than the existing Qt6. Note: This version of MessageDialog is a bit different from the one you linked. That version does not give the expected output. So you think why I'm downgrading to qmake and Qt 5 while I'm normally using Qt6 and CMake! :|
  • Interacting with UI increases loop time in a separate worker thread

    Unsolved
    1
    0 評價
    1 貼文
    215 瀏覽
    尚無回覆
  • QML Application on Rasppberry, Mouse events are passed to the Raspbian Desktop

    Unsolved qml
    1
    0 評價
    1 貼文
    194 瀏覽
    尚無回覆
  • Scope trouble. Accessing propeties out of scope.

    Solved
    5
    0 評價
    5 貼文
    444 瀏覽
    fcarneyF
    Are you wanting the Rectangle to exist when not visible or the data? If its the latter then take a data driven approach rather than messing with Items. You can build a ListModel in QML with your data and access the data inside that. Then it is primed to be used with various views.
  • TabView & Tab missing from Quickcontrols 2

    Unsolved
    1
    0 評價
    1 貼文
    181 瀏覽
    尚無回覆
  • NOTIFY on grouped properties

    Solved
    4
    0 評價
    4 貼文
    547 瀏覽
    raven-worxR
    @ocgltd EVERY property you use in a statement must either be CONSTANT or have a NOTIFY signal. depending on which property gets changed, this notifier signal causes a reevaluation of the property binding.
  • Insert characters with accentuation in inputText

    已移動 Unsolved
    2
    0 評價
    2 貼文
    228 瀏覽
    R
    The problem is caused because I'm using Qt Virtual Keyboard but I don't know how to avoid it.
  • Network programming with Qt

    Unsolved
    7
    0 評價
    7 貼文
    805 瀏覽
    GrecKoG
    Networking is such a broad concept that if you don't have a specific use case it's hard to give advices. The client code for a REST API can be very boring. see this code I made a long time ago to display the bike share network of my city as an example : https://github.com/oKcerG/MeetupSFPMMap/blob/master/main.qml the code to fetch the data is barely 10 lines (and simple ones). The model is handled via https://github.com/benlau/qsyncable , don't populate data manually in a for loop like done in the QML book. For more advance use case you would use QNetworkAccessManager in C++, potentially with OAuth and expose a nice API to QML. Or maybe you need to use a third party lib or implement a binary protocol with QTcpSocket. Or maybe something with zmq or protobuf ...
  • Calling C++ method from QML before UI is shown

    Unsolved
    3
    0 評價
    3 貼文
    352 瀏覽
    J.HilkJ
    @ocgltd Colors is a singleton, so why don't you create a c++ instance/get a reference and call the default color change setter there. After that you load your main.qml. Order of execution is important here.
  • form serial port communication. Send the data from Gui to another board

    Unsolved
    2
    0 評價
    2 貼文
    278 瀏覽
    jsulmJ
    @kk2507 You should start here: https://doc.qt.io/qt-5/qtserialport-index.html There is also link to examples.