Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • Installing a reusable component in Visual Studio?

    Unsolved
    1
    0 Votes
    1 Posts
    110 Views
    No one has replied
  • QML TextArea and ScrollView combination has a buggy result in after resizing

    Unsolved
    2
    0 Votes
    2 Posts
    196 Views
    D
    [image: 911d7d4f-8a76-4a7d-a080-888392158045.png] This also works .
  • Purchase Links for Qml Instrument GUI components

    Unsolved
    1
    0 Votes
    1 Posts
    114 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    37 Views
    No one has replied
  • Setting the visible property to false does not hide elements

    Solved visible qml page
    4
    0 Votes
    4 Posts
    537 Views
    MarkkyboyM
    It may well be something to do with the latest offering of QT, many changes have been made since 5.15. I looks like you have solved your problem, what was it?
  • Can't center text in the Rectangle

    Unsolved
    2
    0 Votes
    2 Posts
    167 Views
    MarkkyboyM
    The text ("+") is central to the Rectangle (grey circle) from what I can see. Otherwise, you need to create another Rectangle, make it black and place the original Rectangle (grey circle) inside the black Rectangle. For now, I've omitted RowLayout; // black rectangle Rectangle { width: 135 height: 235 color: "black" // grey circle with "+" in the center Rectangle{ width: 35 height: width radius: width/2 color: "#D9D9D9" anchors.centerIn: parent // text "+" Text { text: qsTr("+") font.pixelSize: 25 anchors.centerIn: parent } } }
  • Porting to Qt 6 - switch to cmake first?

    Unsolved
    7
    0 Votes
    7 Posts
    736 Views
    SGaistS
    Sounds like a plan ! Good luck :-)
  • The application freezes during serial connection

    Solved
    7
    0 Votes
    7 Posts
    496 Views
    serkan_trS
    @jsulm Thank you
  • Linking a static library created in visual studio to a Qt Quick Application using cmake

    Unsolved
    2
    0 Votes
    2 Posts
    130 Views
    jsulmJ
    @Anjali_AR See https://cmake.org/cmake/help/latest/command/target_link_libraries.html
  • Linking a static library in visual studio to a Qt project using cmake

    Unsolved
    2
    0 Votes
    2 Posts
    132 Views
    jsulmJ
    @Anjali_AR said in Linking a static library in visual studio to a Qt project using cmake: but even after that it's showing error If you get an error then please post it, we should not have to guess what the error is about. Also, show your CMakeLists.txt
  • My executable does not run

    Unsolved
    1
    0 Votes
    1 Posts
    114 Views
    No one has replied
  • Can't access ListModel's roles

    Solved
    4
    0 Votes
    4 Posts
    295 Views
    pillexyz_zP
    @GrecKo Thanks for your answer, now it finally works. ^_^
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    91 Views
  • Promise() as text in Label

    Unsolved
    2
    0 Votes
    2 Posts
    176 Views
    GrecKoG
    You don't. That's not how promises work. then doesn't return a value, it takes a function that will be eventually called and returns the promise itself (the QJSValue or [object Promise] you see). Also you need to call resolve when writing a promise to indicate it is finished : (resolve => resolve(calculateDate))); More info here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises What you could try doing is declaring a new Binding and use the fact that it can change a property, something like the following: // PromiseBinding import QtQml Binding { property var promise onPromiseChanged: promise.then(v => value = v) } Usage would be like this: Label { PromiseBinding on text { promise: new Promise (resolve => resolve(calculateDate().toString())) } } Disclaimer: I haven't tried that.
  • How to generate a surface3D of image gray height ?

    Unsolved
    1
    0 Votes
    1 Posts
    100 Views
    No one has replied
  • Application crashes after fast load using ```Qt.createComponent```

    Moved Unsolved
    5
    0 Votes
    5 Posts
    400 Views
    K
    @piervalli I am currently on macOS
  • QQmlComponent::Error "Type xxx cannot declare new members."

    Solved
    3
    0 Votes
    3 Posts
    471 Views
    Q
    I found a solution to my own problem. The problem was actually not the class Body, but another class that is a parent to Body in the qml-file. I had a forward declared class here that I had missed. This used to work in Qt5 but now in Qt6 they have to be replaced with Q_MOC_INCLUDE.
  • Best way to change the color of Qt Quick Controls

    Unsolved color change controls 2 qt quick qml
    3
    0 Votes
    3 Posts
    636 Views
    SavizS
    @costasjames479 I am aware that other styles are available for Qt Quick Controls. However, according to the documentation, the Basic Style is the most performant and platform-compatible, which is why I prefer to use it. With this in mind, how can I figure out what to place as the attribute or property name instead of ? in the following code: TextField { palette { ?: "blue" ?: "white" } } ComboBox { palette { ?: "blue" ?: "white" } } In other words, is there a detailed list in the documentation that specifies the name of each attribute, which I might have overlooked?
  • This topic is deleted!

    Unsolved
    5
    0 Votes
    5 Posts
    93 Views