Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Combobox not closing when delegate of the listview goes out of scope

    Moved Unsolved
    3
    0 Votes
    3 Posts
    319 Views
    R_ramR
    @SGaist My environment details and I have added the code here OS - Ubuntu 18.04 Qt version - 5.9.6 import QtQuick 2.9 import QtQuick.Window 2.2 import QtQuick.Controls 2.2 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Column { spacing: 0 anchors.fill: parent Item { width: parent.width height: parent.height * 0.4 Image { anchors.fill: parent anchors.margins: 10 source: "https://lh4.googleusercontent.com/proxy/cITVCAj9KJ5Hfwd5iuNDhzdB2pSrMQv2rzTl-vvg23he2qdCisZBG-MzV35y_r2zijC9X4QOpda9eHzr_hA" } } ListView { width: parent.width height: parent.height * 0.6 model: 10 spacing: 5 clip: true highlightRangeMode: ListView.StrictlyEnforceRange delegate: Rectangle { width: parent.width height: 50 color: index % 2 == 0 ? "lightsteelblue" : "steelblue" Row { spacing: 25 anchors.centerIn: parent Label { text: qsTr("%1").arg(index) anchors.verticalCenter: parent.verticalCenter } ComboBox { anchors.verticalCenter: parent.verticalCenter model: ["a", "b", "c"] } } } } } }
  • How to open qml virtual keyboard in horizontal?

    Unsolved
    2
    0 Votes
    2 Posts
    259 Views
    B
    change this code: x: 100 y: parent.height
  • QtQuick 2 MediaPlayer on Windows don't work bufferProgress

    Unsolved
    1
    0 Votes
    1 Posts
    128 Views
    No one has replied
  • Referer in HTTP request in QML

    Unsolved
    1
    0 Votes
    1 Posts
    183 Views
    No one has replied
  • How to change default font size for Text|Label|etc without changing QtWidgets font

    Unsolved
    1
    0 Votes
    1 Posts
    238 Views
    No one has replied
  • Use setData() from QML

    Solved
    14
    0 Votes
    14 Posts
    5k Views
    E
    Done, by inserting rows one by one.
  • NEED HELP!!! Timer Method for Screen Saver in QML

    Unsolved
    3
    0 Votes
    3 Posts
    441 Views
    J
    @sierdzio Thanks for your feedback! Unfortunately, it still does the same thing.. This is driving me crazy :(
  • [SOLVED] QDeclarativeImageProvider and memory leaks with QImage

    9
    0 Votes
    9 Posts
    6k Views
    N
    @mbarclaygmail-com In Qt5 QImage has a clean up function. You can provide a function pointer cleanupFunction along with an extra pointer cleanupInfo that will be called when the last copy is destroyed.
  • QML Modules, Plugins and meta data

    Unsolved
    1
    0 Votes
    1 Posts
    280 Views
    No one has replied
  • Cylindrical Panning

    Unsolved
    1
    0 Votes
    1 Posts
    213 Views
    No one has replied
  • Problem creating plugins.qmltypes for QML

    Moved
    5
    0 Votes
    5 Posts
    3k Views
    mrjjM
    @Noushad Hi I dont think it was resolved. Make a new forum post with enough details of Qt version used, platform and where in https://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html it fails. List any errors and the code used.
  • QML Image: Unable to read image data.

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    MikhailGM
    @SGaist you were right, the image had wrong extension! Everything seems okay for now.
  • QML : anchors.verticalCenter does not work

    Unsolved
    2
    0 Votes
    2 Posts
    337 Views
    raven-worxR
    @cosmoff because the Window is not an item actually. it has a contentItem (default property, which gets the child items reparented to). So use this property, or even better, simply use parent
  • Memory leaks in QtMultimedia 5.0 on QML element MediaPlayer and Video?

    4
    0 Votes
    4 Posts
    3k Views
    R
    Hi All, After futher investigation, i think the issue was more to do with the gstreamer1.0 VA-API plugin. Thank you Richard
  • 0 Votes
    2 Posts
    383 Views
    S
    If anyone comes here for solution, please read below reply from QT support team which I got. You need to block the execution in the handler until the download location has been set. Like below: In BrowserWindow.qml import Test 1.0 FileDialog { id: fd selectFolder: true property bool done: false onAccepted: { done = true } onRejected: done = true } function onDownloadRequested(download) { fd.done = false fd.open() while(!fd.done) { App.process() } download.downloadDirectory = App.urlToDir(fd.folder) downloadView.visible = true; downloadView.append(download); download.accept(); } In cpp files: class App : public QObject { Q_OBJECT public: Q_INVOKABLE QString urlToDir(QUrl url) { return url.toLocalFile(); } Q_INVOKABLE void process() { qApp->processEvents(); } }; int main(int argc, char **argv) { ///all initialization code and including QApplication creation qmlRegisterSingletonInstance("Test", 1, 0, "App", new App); } Regards, Sheetal
  • QMainWindow Goes Blank

    Unsolved
    1
    0 Votes
    1 Posts
    197 Views
    No one has replied
  • How can I choose which Item to display?

    Solved
    3
    0 Votes
    3 Posts
    278 Views
    J.HilkJ
    @RobM There's nothing stopping your from giving your component it's on components to choose from ;) I personally use a Loader where I select the source at runtime.
  • 0 Votes
    1 Posts
    476 Views
    No one has replied
  • Property change notification

    Unsolved
    2
    0 Votes
    2 Posts
    374 Views
    6thC6
    Well, you could bind to changed after | onCompleted? I wouldn't get too hung up on just this if I found out unless it is affecting behaviour or functionality. I do act quite defensively to references to c++ null refs etc in qml and really act to cut rebinds away entierly. To assist me greatly do this, early in main I turn on qt.qml.binding.removal.info category logging. e.g: QLoggingCategory::setFilterRules(QStringLiteral("qt.qml.binding.removal.info =true\n")); That way only the qt/qml objects produce rebind warning or if mine, only very determined rebinds, which I plan on eventually clearing those (currently just one) too.
  • QML Image disply without window

    Solved
    8
    0 Votes
    8 Posts
    737 Views
    SGaistS
    Hi, Because you might want to only use QML. QQuickWidget adds the widget module as dependency which might not be what you want.