Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • Display image in qml using Image provider.

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    fcarneyF
    @Pooja-Bhusare said in Display image in qml using Image provider.: QQmlContext *context = new QQmlContext(engine.rootContext()); Why are you doing this? Don't do this. You don't need a separate context. Connections { target: imageprovider onNewFrameReceived: server_image.reload(); } imageprovider isn't a context property and doesn't need to be one. onNewFrameReceived isn't a signal of your image provider class. Why are you commenting this out?: server_image.source="image://imageprovider/cover" QImage QmlImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize) { return server_image; } I going to return the same image regardless of your image://imageprovider/<value>. Use "id" to differentiate. This is fine if this is what you want. I don't know the networking side very well. I have used image providers a lot. You might need to do this when your image updates. I am not sure if the image provider will signal a change in the image. server_image.source="" server_image.source="image://imageprovider/cover" This will force the update the image if it changed. I have had to do this.
  • 0 Votes
    1 Posts
    133 Views
    No one has replied
  • Make QtCreator recognize the use of qmlRegisterSingletonType (QML module not found)

    Unsolved
    1
    0 Votes
    1 Posts
    161 Views
    No one has replied
  • How to iterate components dynamically using stackview?

    Unsolved
    7
    0 Votes
    7 Posts
    618 Views
    jsulmJ
    @Poor-English said in How to iterate components dynamically using stackview?: I have to work hard to find the posts I have posted before Simply go to your profile: on the upper right side click on your avatar icon and go to your profile. Image upload often does not work properly here. You can upload images to some sharing service and post the link then.
  • How to perform clickable events on 3d Mesh object

    Solved
    5
    0 Votes
    5 Posts
    919 Views
    L
    @Poor-English Thank you, I was able to accomplish it by obtaining the coordinates of the individual part. Also, with the help of coordinates, I was able to write a function to perform clickable events
  • Help with values the slider

    Unsolved
    5
    0 Votes
    5 Posts
    418 Views
    Gabriela20G
    yes, this causes the error.
  • QML and QUndoStack? do we still need a C++ wrapper?

    Unsolved
    4
    0 Votes
    4 Posts
    513 Views
    SGaistS
    I do not know, it's something you can ask on the interest mailing list. As for the Declarative Widgets project, I don't think they do anything special for look and feel. The goal is to be able to use widgets in QtQuick applications. I don't know the current plans for widgets on mobile.
  • States Question, Retractable display controlled by a button

    Moved Unsolved
    1
    0 Votes
    1 Posts
    120 Views
    No one has replied
  • Call function in ui.qml!

    Unsolved
    3
    0 Votes
    3 Posts
    541 Views
    H
    thank you for your response I started a project on Qt Design Studio and then convert it into a Quick project Now the only files I have are ui.qml files Now I need to call the signals from the c ++ files this is my question: how can i call c++ function when i clicked on a shape in ui.qml file?
  • Strange QSqlQueryModel and QML behavior

    Solved
    3
    0 Votes
    3 Posts
    252 Views
    S
    Well, after a some close investigation I have solved my issue. I could not call model's methods because of using the following syntax in delegate's items: model.close() So as far I understood in this case we don't have access directly to model's methods. But if I define my model as a context property: engine.rootContext()->setContextProperty("wordsStorage", backend.wordsStorage()); everything works well and pretty enough. Finally QSqlQueryModel has nothing to do with it. Such thing happens with an arbitrary model. I'm going to mark this topic as 'solved', but anyway: is there a way to do this without using root context? Otherwise QML part is going to be full of this contexts in a large project. Is it okay or not?
  • Graph plotting issue in QML

    Unsolved
    2
    0 Votes
    2 Posts
    224 Views
    ODБOïO
    @mnhg hi for(var i in ary) grp1.append(ary[i],i)
  • Get file name, line number and function name in QML Javascript from C++. How?

    Unsolved
    1
    0 Votes
    1 Posts
    163 Views
    No one has replied
  • Qt Scene Graph Problem

    Solved
    3
    0 Votes
    3 Posts
    294 Views
    lightwindL
    Thank you very much! I find that glviewport() function control this. It draws everything by four elements. I draw what I want at right position, and it worked!
  • How to push a button on a bottom of a QWidget window from a overlayed QML window ?

    Solved
    5
    0 Votes
    5 Posts
    361 Views
    M
    @raven-worx Thank you so much . I finally make it .
  • Scrolling a ColumnLayout

    Solved
    4
    0 Votes
    4 Posts
    498 Views
    ODБOïO
    @LorenDB do you mean https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#fillHeight-attached-prop https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#fillWidth-attached-prop
  • How to Change ProgressBarStyle In QT 5.14

    Unsolved
    2
    0 Votes
    2 Posts
    214 Views
    ODБOïO
    @SumitK hi see https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#customizing-progressbar
  • How to limit the tilt angle to 180 deg in QML?

    Unsolved
    2
    0 Votes
    2 Posts
    329 Views
    kshegunovK
    You don't. Write your own camera controller and handle the transformation yourself.
  • Print current timestamp in Milliseconds since epoch time in QML

    Solved
    4
    0 Votes
    4 Posts
    10k Views
    ODБOïO
    @Philomath-Qt said in Print current timestamp in Milliseconds since epoch time in QML: Unfortunately my QML file prints the time two times, because for some reason the signal of the qobject is received twice instead of once. I'm not the first one that has this problem, but to find the root of this problem is rather complecated (origin seems to be multithreading). If you know a easy workaround, so that the the console.log only gets printed every second time, please let me know. I would rather try to fix the real issue, but if you really want to do that then go ahead.. @Philomath-Qt said in Print current timestamp in Milliseconds since epoch time in QML: edit: getTime() doesn't work for some reason, i had to use Date.now() the reason should be printed in the "application output" tab of you editor this works var date = new Date() console.log(date.getTime())
  • I am trying to call multiple qml item in swipeview but its not working?

    Moved Unsolved
    1
    0 Votes
    1 Posts
    560 Views
    No one has replied
  • Quick Controls 1 - ComboBox items unselectable on MacOS

    Solved combobox macos
    9
    0 Votes
    9 Posts
    1k Views
    SGaistS
    The patch is public so you can build the module yourself to have the fix.