跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • End of MenuBar not visible if window is not wide enough.

    Unsolved qml menubar style
    1
    0 評價
    1 貼文
    258 瀏覽
    尚無回覆
  • Distinguish between the models 'id' and the local/view 'id'.

    Unsolved
    4
    0 評價
    4 貼文
    400 瀏覽
    fcarneyF
    I have run into serious problems when I shadow names of features or properties in Item or derived from Item. It is better to just name it something that cannot clash. static const QHash<int, QByteArray> roles { {NameRole, "nameRole"}, {IdRole, "idRole"}, {ChildCountRole, "childCountRole"}, {ActiveRole, "activeRole"}, }; Putting role in the name automatically documents this is coming from the model. Using simple names that have a chance to clash just opens you up to failing later because something is added to an object later. Analogous to using i, j, and k in every loop. It is a pain to diagnose. It is a bad habit that will cost you time months from now. Text is cheap, descriptive names don't cost you anything, but can cost you hours if you collide with other names. Search and replace is a thing. Autocomplete is a thing. Use them to supplement having to type in long variable names.
  • How to load a secure html image in a Text item

    Unsolved
    8
    0 評價
    8 貼文
    683 瀏覽
    M
    Ah sorry @raven-worx I thought I had it in my example but I did not. Text { id: descriptionLabel text: "Description:" font.bold: true wrapMode: Text.Wrap textFormat: Text.RichText text: "<p><span class=\"image-wrap\" style=\"\"><img src=\"https://ommitted.atlassian.net/secure/attachment/10000/10000_reply.png\" height=\"17\" width=\"22\" style=\"border: 0px solid black\" /></span></p>" } Running on Windows 10 @GrecKo yes I suspect the cookies are being added correctly but I just have the wrong cookies and will need to discuss with atlassian
  • Regarding Slider in QML

    Solved
    14
    0 評價
    14 貼文
    5k 瀏覽
    M
    Ok I helped myself right now by creating a Rectangle and setting the anchor to the handle. Then I rendered everything necessary on top. Rectangle{ anchors.centerIn: handle z: 1 width: 76 height: 76 radius: width / 2 border.width: 3 border.color: temperatureControlSlider.pressed ? "green" : "white" color: "black" } Text{ anchors.centerIn: handle z: 1 color: "red" font.pixelSize: 30 text: temperatureControlSlider.value } } It's a bit strange because I found only solutions similar to my previous post. But maybe it's because of Qt6 or so. You need to grab the handle (which is now "invisible") but yeah. It works x)
  • Moving qml Map from first SplitView to second SplitView using takeItem and addItem

    Unsolved
    1
    0 評價
    1 貼文
    145 瀏覽
    尚無回覆
  • spike in CPU usage replotting qml chart

    Unsolved
    1
    0 評價
    1 貼文
    118 瀏覽
    尚無回覆
  • Import a figma design after changes didn't reflect

    Unsolved
    2
    0 評價
    2 貼文
    183 瀏覽
    mrjjM
    Hi and welcome to the forums. Nothing wrong with the post as such, but always good to include the Qt version used. Forgive my ignorance but Is Figma from figma.com ?
  • 0 評價
    6 貼文
    3k 瀏覽
    J
    After updating to GCC 10, I am not facing that issue still now. Thanks for the support
  • libvlc wrapper The program has unexpectedly finished.

    Unsolved
    3
    0 評價
    3 貼文
    335 瀏覽
    T
    thanks is fixed i forgot to put vlc in enveirment path
  • Have Qt creator stop adding /*##^## ... ##^##*/ to files

    Solved
    8
    0 評價
    8 貼文
    863 瀏覽
    J
    Thanks! That solved the problem.
  • How to set country specific QML Maps locales?

    Unsolved
    1
    0 評價
    1 貼文
    146 瀏覽
    尚無回覆
  • Load Image From Device

    Unsolved
    8
    0 評價
    8 貼文
    692 瀏覽
    dheerendraD
    From the directory you should read the filenames, build the model & then show them in your app.
  • PlaylistItem not working with properties

    Unsolved
    1
    0 評價
    1 貼文
    130 瀏覽
    尚無回覆
  • Unable to write properties of Q_GADGET

    Unsolved
    1
    0 評價
    1 貼文
    186 瀏覽
    尚無回覆
  • Same issue for me also using QuickControls2

    Unsolved
    1
    0 評價
    1 貼文
    139 瀏覽
    尚無回覆
  • Create QML TableView from JS array best way. How?

    Solved
    2
    0 評價
    2 貼文
    303 瀏覽
    B
    Issue closed. Solution found. Example published here Be careful when using this kind of approach. There are a lot of memory will be used.
  • Dynamic font change in qt qml applications

    Unsolved
    1
    0 評價
    1 貼文
    181 瀏覽
    尚無回覆
  • how to read linux device serial number

    Solved
    4
    0 評價
    4 貼文
    394 瀏覽
    M
    i manage solve it by using QProcess
  • Text not in the center of TextField, when creating a rounded TextField

    Unsolved
    7
    0 評價
    7 貼文
    1k 瀏覽
    AmrCoderA
    Thank you very much for testing this, yes I think it's an issue, I even tested on QT Gallary example that comes with QT 6.2 and I added the rounded background and it give the same issue, but lower version this is not happen, I will report the Bug.
  • Usage of QtQuickCompiler in Qt6

    Unsolved
    3
    0 評價
    3 貼文
    2k 瀏覽
    T
    @vix Hi vix, have QtSupport confirmed this?