Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • Singleton QML failed to load as module

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    N
    @KroMignon Sorry, I read your too quickly your first post. As you have defined TestMe as singleton, you can not create any instance of it, because its already exists! Change your main.qml as follow, it should than work: import QtQuick 2.15 import QtQuick.Window 2.15 import base 1.0 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") + TestMe.value Component.onCompleted: TestMe.value ="new value" } Oh yeah you are absolutely right, since it's a singleton the instance already exists! Of course now it works as expected! :) Thank you for your help!
  • [PROBLEM] How to store an image to reuse it

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    M
    @JoeCFD I found the solution now the problem is writing on Android, after downloading all the stuff and I try to write I get this error "Problem opening save file "/storage/emulated/0/Pictures/tmpImg.jpg" for download "Operation not permitted" Meanwhile If i create the file I get "Problem opening save file "/storage/emulated/0/Pictures/tmpImg.jpg" for download "Permission Denied" This is the code I used: void DownloadManager::startDownload() { if (downloadQueue.isEmpty()) { qDebug() << "[DownloadManager::startNextDownload]" << downloadedCount << " " << totalCount << " files download succesfully"; emit finished(); return; } QUrl url = downloadQueue.dequeue(); // QString filename = saveFileName(url); QString filename = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); //Prendo nome primo elemento ed inserisco nella lista, poi lo rimuovo if(!imagesName.isEmpty()) { filename.append("/"); filename.append(imagesName.first()); imagesName.removeFirst(); } qDebug() << "[DownloadManager::startNextDownload] Filename " << filename; output.setFileName(filename); if (!output.open(QIODevice::WriteOnly)) { qDebug() << "[DownloadManager::startNextDownload] Problem opening save file " << filename << " for download " << output.errorString(); qDebug() << "[DownloadManager::startNextDownload] Skipping download"; startNextDownload(); return; // skip this download } //Download the file into the location QNetworkRequest request(url); currentDownload = manager.get(request); connect(currentDownload, &QNetworkReply::finished, this, &DownloadManager::downloadFinished); connect(currentDownload, &QNetworkReply::readyRead, this, &DownloadManager::downloadReadyRead); // prepare the output qDebug() << "[DownloadManager::startNextDownload] Downloading " << url; }
  • Is there a way to start qt webgl on a https connection ?

    Unsolved
    1
    0 Votes
    1 Posts
    146 Views
    No one has replied
  • How can I fill a "ListView QML Type" with a model from a "QList<QString>"'?

    Solved qtquick qml
    15
    0 Votes
    15 Posts
    7k Views
    P
    i made a script that fetch IP addresses and save them to QList and now i want to show buttons as many as the sizeof the QList in qml and i couldn't use the QAbstractListModel nor the Q_PROPERTY please help me.
  • can Surface3D convert to Q3DSurface ?

    Unsolved
    1
    0 Votes
    1 Posts
    171 Views
    No one has replied
  • Tableview column names not showing.

    Unsolved
    1
    0 Votes
    1 Posts
    186 Views
    No one has replied
  • QML Drag breaks when switching pressed button

    Unsolved qml drag&drop
    1
    0 Votes
    1 Posts
    430 Views
    No one has replied
  • ListView: Use positionItemAtIndex when some items are invisible

    Solved
    3
    0 Votes
    3 Posts
    212 Views
    M
    Hm, my question started with wrong assumptions, so I will close this question
  • Recommend a good starting point for QtQuick3D and Physics

    Unsolved
    1
    0 Votes
    1 Posts
    132 Views
    No one has replied
  • Deploy to iPhone fail after Build Success.

    Unsolved
    2
    0 Votes
    2 Posts
    196 Views
    KH-219DesignK
    I am only making a guess. (The last time I used Qt on iOS I was using XCode 11.) These seem relevant: https://bugreports.qt.io/browse/QTBUG-68705 https://bugreports.qt.io/browse/QTCREATORBUG-25535 If you are using Qt Creator, it seems like maybe you should attempt the following as a potential workaround/experiment: build at a command prompt (mac "Terminal" shell) open the YOUR_PROJECT.xcodeproj in XCode and perform further iPhone deployment steps from inside Xcode directly.
  • How to start qt application from browser

    Unsolved
    4
    0 Votes
    4 Posts
    451 Views
    Pablo J. RoginaP
    @Mc6bullet so please mark your post as solved!
  • Graphics performance drops when running with multiple (duplicate) windows

    Unsolved
    1
    0 Votes
    1 Posts
    223 Views
    No one has replied
  • Package containing QtQuick Timeline module

    Unsolved
    4
    0 Votes
    4 Posts
    530 Views
    JKSHJ
    @kwojcik said in Package containing QtQuick Timeline module: I am using Ubuntu 18.04 aka Bionic Beaver. Qt Quick Timeline was introduced with Qt 5.14 (https://www.qt.io/blog/qt-5.14-has-released ) However, Bionic Beaver's repo only has Qt 5.9, so you won't be able to install it from the Linux command line. I suggest you run the Qt installer (https://www.qt.io/download-open-source ) and install Qt 5.15. That will have Qt Quick Timeline built in.
  • Adding 2nd window causes animation stuttering in 1st window

    Unsolved
    4
    2 Votes
    4 Posts
    783 Views
    S
    @Jarrod It seems like I'm having the same issue. When running a Qt application with a single window the performance is good, running at 60 FPS. However, when adding a secondary window (actually a duplicate) the performance starts to drop. Performance continues to drop when adding more and more windows, while still not fully using available CPU power (approx. 160% out of 400%). Did you manage to find a solution or workaround for your issues?
  • distance and time of a route qml

    Unsolved
    2
    0 Votes
    2 Posts
    179 Views
    ndiasN
    Hi @BeniNoa , If you are looking for an alternative to Google Map API, you can opt for the OpenStreetMap solution. It offers several routing solutions including offline routing (https://wiki.openstreetmap.org/wiki/Routing)
  • what's the problem of scroll widget that it caused frame drop?

    Unsolved
    3
    0 Votes
    3 Posts
    293 Views
    A
    Thanks your replay! the issue is when I access the testufo.com by browser app, while touch and scroll the window then the framerate will drop to 40~50 fps. I just wanna the fps to be very stable of 60fps, a very simple QML's ListView widget shows the same problem too in our developing mobilephone. Are there some issues between touch event and rendering?
  • This topic is deleted!

    Unsolved
    4
    0 Votes
    4 Posts
    33 Views
  • Capturing column order change in a TableView

    Unsolved
    1
    0 Votes
    1 Posts
    161 Views
    No one has replied
  • Create a custom componant using a loop for

    Unsolved
    2
    0 Votes
    2 Posts
    166 Views
    C
    Did you have a look at the Repeater Component? https://doc.qt.io/qt-5/qml-qtquick-repeater.html
  • endMoveRows in model crashes my app

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    I
    I think it crashes because move up from 2 to 3 equals to do nothing. According to doc https://doc.qt.io/qt-5/qabstractitemmodel.html#beginMoveRows If you want to move 2 to 3 you have to move 2 to 4, but in this case you will have a problem with pre_last & last element. So there is a tricky way to do that: move 3 to 2 void ObjectModel::move(int from, int to) { ... if (from + 1 == to) std::swap(from, to); beginMoveRows(QModelIndex(),from,from,QModelIndex(),to); ... endMoveRows(); }