跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • How to customize Popup dimming effect?

    Unsolved
    3
    0 評價
    3 貼文
    460 瀏覽
    P
    @J-Hilk Dimming effect is not related to background. I think I need to use Overlay.modal attached property like so: Popup { ... modal: true Overlay.modal: Rectangle { color: "#aacfdbe7" // color/opacity } }
  • Moving Popup when main window resized

    Solved
    7
    0 評價
    7 貼文
    1k 瀏覽
    B
    @fcarney actually, I am not too bothered about anchors and centering as the popups are initially shown in positions based on user mouse clicks, etc. The initial stumbling block for me was just getting hold of the top-level window size and being notified of changes. Now that I can do that, I can think about the details of how I need to react to the changes.
  • QML force delegate instantiation

    Unsolved qml delegate
    2
    0 評價
    2 貼文
    553 瀏覽
    sierdzioS
    You should not want that. Delegates are only a visual representation of the model, and ListView is designed to only show (and instantiate) what the user needs to see. Forcing it to show everything will decrease performance. If you definitely need to generate UI for all elements in a model, use Repeater.
  • Responsive Design in QML

    Unsolved
    2
    0 評價
    2 貼文
    424 瀏覽
    sierdzioS
    Rectangle { anchors.fill: parent } This will make your Rectangle fill the window.
  • I am having some sort of problem with Q_PROPERTY

    Unsolved
    3
    0 評價
    3 貼文
    239 瀏覽
    A
    I did what you said, there was one thing that I had to change that you would have overlooked, but this loads the tile = 0 for all tiles.
  • How to apply the same background to all DelegateChioces in DelegateChooser?

    Unsolved
    6
    0 評價
    6 貼文
    527 瀏覽
    fcarneyF
    @Puya said in How to apply the same background to all DelegateChioces in DelegateChooser?: How would that work with the delegate (a QML component) coming from the model (C++ object)? No idea. I don't know what that means.
  • Can't scroll content of a ScrollView

    Unsolved
    4
    0 評價
    4 貼文
    383 瀏覽
    ocgltdO
    I suspect that adding a scrollbar to a scrollview disconnects it from everything. I've read the docs, and although the don't explicitly say so, I think scrollView contains an inherint scrollbar. So add a new one: ScrollBar.vertical: ScrollBar {} cases a standlone scrollbar connected to nothing.
  • EGLFS : OpenGL error while trying to open a new Window in QML

    Solved
    11
    0 評價
    11 貼文
    1k 瀏覽
    raven-worxR
    @Gunkut i think you are better off by using a StackView element instead of a loader. To push (a new page) into or pop (remove the current page) the StackView in which your current page/window currently is use the provided attached properties (e.g. StackView.view.push() / StackView.view.pop())
  • ListView: disable auto selection

    Solved
    4
    0 評價
    4 貼文
    916 瀏覽
    M
    @KroMignon Thank you, it works
  • Passing a variable to a CircularGauge object.

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

    Unsolved
    1
    0 評價
    1 貼文
    12 瀏覽
    尚無回覆
  • DelegateChooser not working with TableView and QStandardItemModel

    Unsolved
    5
    0 評價
    5 貼文
    1k 瀏覽
    strahlexS
    I'm seeing the same thing here as well. Has anyone reported it as bug?
  • Qml TextEdit Custom key event not processed properly

    Solved
    2
    0 評價
    2 貼文
    222 瀏覽
    C
    Seems like I have to write event.accepted = false and then it works
  • QSortFilterProxyModel sub-class registration and instantiation issue.

    Solved
    2
    0 評價
    2 貼文
    314 瀏覽
    SiN_BizkitS
    Maybe it will help someone. This code fixed the issue: #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) qmlRegisterAnonymousType<QAbstractItemModel>(uri, 1); #else qmlRegisterType<QAbstractItemModel>(); #endif
  • How can I bind properties of select Listview delegate with other component properties?

    Solved
    2
    0 評價
    2 貼文
    237 瀏覽
    oria66O
    For the record, I used custom getters of the model, with the current index of the Listmodel.
  • QML TreeView using only QtQuick 2 works fine?

    Solved
    5
    1 評價
    5 貼文
    2k 瀏覽
    jsulmJ
    @maxwell31 What exactly do you mean? Do you want to modify QQuickTreeModelAdaptor? Or why else you would need to "copy"? If you want to modify QQuickTreeModelAdaptor then you have ot make your changes open source (LGPL requirement).
  • Qt Quick emulation crashed. (line 1) error

    Unsolved
    1
    0 評價
    1 貼文
    157 瀏覽
    尚無回覆
  • module "QtApplicationManager" is not installed

    Unsolved
    2
    0 評價
    2 貼文
    587 瀏覽
    raven-worxR
    @flwwater when you are talking about this QtApplicationManager type, you will need a commercial license of Qt first.
  • Get file name, line number and function name in QML Javascript. How?

    Solved
    9
    1 評價
    9 貼文
    5k 瀏覽
    KH-219DesignK
    @ondrejandrej said in Get file name, line number and function name in QML Javascript. How?: Is there a way to print file name only? Yes and no. These are the tokens accepted by qSetMessagePattern: https://doc.qt.io/qt-5/qtglobal.html#qSetMessagePattern For filename, there is only one choice (the "%{file}" that we have already seen). There isn't anything like "shortfile" or "filebasename" from what I can see. So I can think of two options. (1) you can write your own QtMessageHandler function, as done in this example: https://github.com/qt/qtbase/blob/fcea8e7aa8a/examples/vulkan/hellovulkanwidget/main.cpp#L79 Anything that is logged will get routed to your handler function, and you can get the filename and all the other info from the QMessageLogContext passed to the handler, and you can then have total control over logging. (2) Keep the logging as you have it now (with long file name and file path), and write a separate little bash script (or perl script, or python script) to filter the output whenever you pipe logging info to your script. I guess (2) might not be great if you are looking at the output inside a debugger. Nonetheless, here is an example of what I mean in (2), as demonstrated at a bash prompt... If I launch my app like so: ./app This long line of output appears 2021-04-26 08:33:52 [QT-info][thr:1991]/opt/repositories/client/self/heory/gits/heory/src/app/event_filter.cc(76): this GUI thread is running unblocked. But if I launch it and pipe output through a sed filter: ./app |& sed 's/opt\/repositories\/client\/self\/heory\/gits//' That same log line will shrink to: 2021-04-26 08:33:46 [QT-info][thr:1951]//heory/src/app/event_filter.cc(76): this GUI thread is running unblocked. (Sidenote: in case the |& that I like to call pipepersand is as new to anyone as it is recently new to me, here is a reference on piping in bash with {pipe,ampersand})
  • 0 評價
    4 貼文
    353 瀏覽
    JKSHJ
    @JL-SABATIER You're most welcome. Happy coding!