Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • text positioning/wrap conflict

    Solved
    2
    0 Votes
    2 Posts
    294 Views
    J.HilkJ
    @mzimmers Text { anchors { horizontalCenter: parent.horizontalCenter verticalCenter: parent.verticalCenter } text: "remove cap" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter width: parent.width // need this to make wrapping work. wrapMode: Text.WordWrap }
  • Deploy a Qt qml package and remove .qml dependencis

    Unsolved
    5
    0 Votes
    5 Posts
    641 Views
    J
    @KH-219Design Yes it is correct.
  • Qt Location Esri Plugin

    Solved
    2
    0 Votes
    2 Posts
    362 Views
    M
    Replacing HTTP with HTTPS in the QtLocation esri plugin code solved the problem. QTBUG-92111
  • populate ComboBox with application (sub)folder files

    Solved
    2
    0 Votes
    2 Posts
    268 Views
    C
    changing the prefix from "file://" to "file:///" made the code working on Windows (but of course failing on Linux)
  • qmlRegisterType and the UI thread

    Solved
    4
    0 Votes
    4 Posts
    627 Views
    VStevenPV
    Thank you all for your comments; they are extremely useful.
  • Qt quick application- how do i get text data from a web page.

    Moved Solved
    5
    0 Votes
    5 Posts
    813 Views
    jsulmJ
    @NIvil-Wilson You download the data and parse it then. How exactly to parse depends on the web-site - there is no general rule. How to download (from the link I posted): QNetworkAccessManager *manager = new QNetworkAccessManager(this); connect(manager, &QNetworkAccessManager::finished, this, &MyClass::replyFinished); manager->get(QNetworkRequest(QUrl("http://qt-project.org"))); There are also examples, for example: https://doc.qt.io/qt-5/qtnetwork-http-example.html
  • Camera qml : set encoder properties

    Unsolved
    1
    0 Votes
    1 Posts
    147 Views
    No one has replied
  • updating visibility based on QVariantList

    Solved
    7
    0 Votes
    7 Posts
    747 Views
    mzimmersM
    Oh, sheesh...I can't believe I forgot that. Thanks, J.Hilk.
  • Gridview / Grid - How to implement the following with a model

    Unsolved qml gridview grid model flickable
    5
    0 Votes
    5 Posts
    2k Views
    N
    Hi @LeLev, I tried your solution. Its showing the image. That is fine. Now if i have more elements then its filling in the same space. I need to scroll thorough the screen to see the elements. How to do that ? How should I use Flickable in this case. Note: For example: If the screen layout is 500x500, and each element size id 50x50, then i should only see 16 elements initially. I have to scroll down on the screen to see the remaining elements.
  • Access C++ factory-created objects from QML

    Unsolved factory dynamic
    4
    1 Votes
    4 Posts
    995 Views
    jeremy_kJ
    Do these objects output by the factory have a lifetime that needs to exceed the QML component used for the object's controls? If not, I would make the object a QML (not Quick) type, and have the component that displays the controls also instantiate the object. Even if they do have lifetimes that don't match the UI portion, the controls can be thin wrappers around the objects that really implement the backend. In the example below RadioBackend and TapeBackend are QObject derived classes that export Q_INVOKABLE functions and properties for communication with the UI. Register them with one of the qmlRegister* functions, depending on the desired interface. For example: Radio.qml: Rectangle { color: control.colorTheme RadioBackend { id: control } Row { Button { onClicked: control.doAction() } Button { onClicked: control.doOtherAction() } } } TapeDeck.qml: Rectangle { color: control.colorTheme TapeBackend { id: control } Button { onClicked: control.doTapeAction() } } main.qml: Loader { property MediaType mediaType source: mediaType === MediaType.Radio ? "file://Radio.qml" : "file://TapeDeck.qml" }
  • QtQuick3D Touch Input?

    Unsolved
    1
    0 Votes
    1 Posts
    211 Views
    No one has replied
  • Force active focus on top QML Window

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    J
    @jeremy_k That's it! Thank you very much, I knew it was something simple I'd forgotten.
  • BorderImage doesn't work as it's supposed to

    Unsolved
    4
    0 Votes
    4 Posts
    331 Views
    Q
    @jeremy_k Thank you. I use the code below and it worked: import QtQuick 2.15 import QtQuick.Window 2.15 Window { width: 800 height: 700 visible: true Image { id: image width: 200; height: 200 anchors.centerIn: parent source: "qrc:/test.png" } BorderImage { id: brdrImage x: image.x y: image.y + image.height + 10 width: 200; height: 200 border { left: 30; top: 30; right: 30; bottom: 30 } source: "qrc:/test.png" horizontalTileMode: BorderImage.Stretch verticalTileMode: BorderImage.Stretch } } [image: 291a274e-58af-4d8f-9d26-8aa39fee2094.PNG] But one more question, this time on the corners of the image. They shouldn't change based of the definition of BorderImage but in the output image (the one in the bottom) they have changed. why, please?
  • 0 Votes
    1 Posts
    434 Views
    No one has replied
  • What's faster: JS comparison vs C++ bool

    Unsolved
    4
    0 Votes
    4 Posts
    340 Views
    SeeLookS
    In fact, there is one more option for this riddle: if (GlobalObject.someClass.type === 0) // SomeClass.SomeType and that comment is mandatory part of the code. It makes one call less but it is clumsy.
  • Qt5 QtQuick Design Mode Crashes

    Unsolved
    1
    0 Votes
    1 Posts
    244 Views
    No one has replied
  • 0 Votes
    7 Posts
    2k Views
    H
    @LeLev Many thanks!
  • QQmlEngine.retranslate() blocks main thread

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    J.HilkJ
    @jeremy_k you're right, @Witzgy you may get a much faster translation happening when you do the old way of translating / updating translatable strings, with the empty string update: https://wiki.qt.io/How_to_do_dynamic_translation_in_QML also, it would probably help if you do not load all QML components on startup. Dynamically created pages/components fetch the correct language string automatically, and you only need to update those, that are currently created. Thats why I have a StackView as root component, where I keep the stack size to a minimum (always pop before push)
  • Memory increase in Qt Device utilities network settings - boot2Qt

    Unsolved
    2
    0 Votes
    2 Posts
    216 Views
    SGaistS
    Hi, Boot2Qt being a commercial offering, you should contact the Qt Company directly.
  • 0 Votes
    8 Posts
    6k Views
    JonBJ
    @Elg1 I don't think anyone/the OP is around any longer to answer from a thread from 5 years ago! Suggest you open your own new thread question.