Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • QML Image: Error decoding: data:image/jpeg;base64,

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    SGaistS
    Hi, Can you explain exactly what you did to deploy your application ? Does it run successfully on your machine outside of Qt Creator once you deployed it ?
  • SwipeView shows all pages and no swipe

    Unsolved
    1
    0 Votes
    1 Posts
    175 Views
    No one has replied
  • How can I simply customise one aspect of a button?

    Solved
    3
    0 Votes
    3 Posts
    250 Views
    V
    That works, thanks!
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • Extend the JS console object. How?

    Unsolved
    1
    0 Votes
    1 Posts
    123 Views
    No one has replied
  • Make JS-object available in any file without import. How?

    Unsolved
    1
    0 Votes
    1 Posts
    144 Views
    No one has replied
  • Dynamically create inline Component

    Unsolved
    4
    0 Votes
    4 Posts
    522 Views
    jeremy_kJ
    I hadn't noticed the addition of the component keyword. Thanks for pointing it out. The syntax I've used previously is: Item { property Component myComponent: Text { ... } Component.onComplete: myComponent.createObject() }
  • QML application fails to start when QT_OPENGL=desktop set

    Solved
    4
    0 Votes
    4 Posts
    792 Views
    SGaistS
    The idea behind the dynamic backend is to be able to detect what is available. From the looks of it there's an issue with the driver on that machine. In any case, forcing the backend to desktop for all Qt applications on a system is wrong. It should be done on an application basis.
  • Get the total window dimensions

    Solved
    2
    0 Votes
    2 Posts
    274 Views
    raven-worxR
    @Circuits you can access the current window from "anywhere" using the attached property. Is thats what you are after?
  • QML signal and slot between 2 different QML

    Solved
    8
    0 Votes
    8 Posts
    3k Views
    G
    @J-Hilk That solved the error. Thank you :)
  • How to save code in QML

    Unsolved
    5
    0 Votes
    5 Posts
    454 Views
    jeremy_kJ
    @ACaldas If they're all visual children of a container item, this imperative block works: onToggled: { for (var child in parentItem.children) { if (undefined !== parentItem.children[child].checked) { parentItem.children[child].checked = false; } else if (undefined !== parentItem.children[child].enabled) { parentItem.children[child].enabled = false; parentItem.children[child].value = 0; } } } You might also look into either directly binding the values, or using a State. I don't think that these will result in fewer lines, but the relationships might be easier to understand and modify when necessary.
  • Component load modelData failed

    Solved
    6
    0 Votes
    6 Posts
    561 Views
    jeremy_kJ
    @Silvia-V said in Component load modelData failed: @jeremy_k Well, The mechanism make me confused Fond a way to fix it ... If there is no better solution, it can only become solved. If that works and is something you find understandable, that looks like a reasonable structure. Presuming that this is representative of the real structure rather than a compact example, you might consider changing property Component delegate to be an alias for the Repeater delegate, and then define the default delegate inline. For non-inline delegates, I favor passing modelData as an explicit property. That makes the delegate easier to reuse or test outside of a view. Thank you @jeremy_k Forgive my broken English[cry] The question was clear, and the included code resolved any doubt. There's nothing to apologize for.
  • How to customize Popup dimming effect?

    Unsolved
    3
    0 Votes
    3 Posts
    459 Views
    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 Votes
    7 Posts
    1k Views
    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 Votes
    2 Posts
    551 Views
    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 Votes
    2 Posts
    424 Views
    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 Votes
    3 Posts
    237 Views
    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 Votes
    6 Posts
    525 Views
    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 Votes
    4 Posts
    383 Views
    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 Votes
    11 Posts
    1k Views
    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())