Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • TabView dynamically creating tabs, cant pass the data

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Can qml signal parameter MouseEvent be mapped to C++ class?

    5
    0 Votes
    5 Posts
    4k Views
    L
    @Xander84 Yes, you're right. I've done like what you suggested. It works. Thank u.
  • QML ScrollBar

    3
    0 Votes
    3 Posts
    2k Views
    G
    Problem shift to the right [Solved] :)) Can anyone help with text ? :)
  • Memory leak when using sourceSize on images in list views?

    1
    0 Votes
    1 Posts
    954 Views
    No one has replied
  • QML Styling

    1
    0 Votes
    1 Posts
    619 Views
    No one has replied
  • [solved]Qt Quick Controls Scope

    3
    0 Votes
    3 Posts
    899 Views
    W
    Thanks, after the renaming of the property everything works.
  • Construct QQmlListProperty from QList<MyClass>

    2
    0 Votes
    2 Posts
    1k Views
    V
    search "QQmlListProperty" inside Qt examples folder, you will get answers.
  • Applying a shader on all parent items

    1
    0 Votes
    1 Posts
    532 Views
    No one has replied
  • Import of remote directory with qml files does not work

    4
    0 Votes
    4 Posts
    6k Views
    D
    Thanks again for a detailed answer which clears many things up. Unfortunately I cant use Qt.createComponent(), because the qml file that is dynamically loaded is generated at runtime on the remote repository, so that I dont have a physical file available :/
  • 0 Votes
    4 Posts
    7k Views
    C
    You can use implicitHeight and implicitWidth to help with this sort of thing, if you are not using higher-level controls to help you with layouts.
  • Cross compiling QT application for Atmel SAMA5D3 Board

    3
    0 Votes
    3 Posts
    3k Views
    SGaistS
    Hi and welcome to devnet, Timesys providing the complete SDK for this board, I would recommend asking them directly, they are the more knowledgable about that matter.
  • 0 Votes
    9 Posts
    3k Views
    4
    This is the expected behaviour. If you want to have items which follow the window size then you must use bindings, not imperatively set the properties[1]. If you want to have items which follow the screen size, then bind[2] to the Screen attached property http://qt-project.org/doc/qt-5/qml-qtquick-window-screen.html instead of waiting for the window to get it's final size (a point in time which varies per platform). [1]This will be easier if you use a QQmlApplicationEngine instead of a QQuickView and have the window constructed in QML, e.g. Window { visibility: Window.FullScreen; visible: true } [2]You may still have to bind to the screen values, as the items don't know which screen they're on until after a certain point in the window setup still. But I think that they'll know much earlier.
  • Read text file in array

    4
    0 Votes
    4 Posts
    3k Views
    X
    Hi, can you maybe give an example or function prototype how you would like to use it? It should be fairly easy to read that file in and split the columns. what i mean do you want a separate array for each column or a multidimensional array e.g. @ // separate array for each column c1 = [1,2,3,...] c2 = [4,5,6,...] c3 = [7,8,9,...] // or multidimensional array a = [ [1,2,3,...] [4,5,6,...] [7,8,9,...] ] @ or something else? Also you know there is no way you can return multiple values with one return value, you could use callback function or "wrapper" like a std::tuple but then again you could just use a multidimensional array in the first place :D
  • Using JS eval to create a Javscript in-app console

    2
    0 Votes
    2 Posts
    1k Views
    J
    This is a valid use case and we have previously used this to demonstrate live coding at different occasions. You can for instance check out a series of youtube videos that Andres Baldwin did showing off Qt 5 on the raspberry "Raspberry PI":https://www.youtube.com/watch?v=A-vBbqamNBU In practice that demo is most likely using a Loader and not eval but the implications are of course similar. Note that Qt will not provide you any form of sandboxing or access control like a web browser would. Any library or function exposed to Qt Quick in your app would also be accessible to the end user so it might be possible that the he would get access to supposedly secret things like app tokens or other users personal data. It all comes down to how your application is designed though.
  • How to use a triangle mesh in vertexShader of ShaderEffect?

    2
    0 Votes
    2 Posts
    860 Views
    M
    More specifically, I need to warp an image using a pair of triangle meshes. The vertexes in these two triangle meshes have been paired (one to one correspondence). I would like just to set the vertex correspondence in the vertexShader code.
  • VideoOutput from /dev/video

    5
    0 Votes
    5 Posts
    2k Views
    _
    Sorry I haven't tried with rtsp.
  • Compute window size for a custom dialog based application

    3
    0 Votes
    3 Posts
    939 Views
    C
    Yes, but I am facing a different problem: how to compute width and height so that my window has the same size on different screen resolutions
  • Component runtime optimization

    5
    0 Votes
    5 Posts
    1k Views
    J
    I think this change by itself is not very useful. Note that Loader is by default synchronous meaning it will block until the item it loads has completed. This is usually wanted behaviour because otherwise you will see it pop into existence after the initial window has been shown. In reality this means that the snippet above would be slower than not using a Loader because you are simply constructing and adding yet another item to the scene. You can set the asynchronous property to false on your Loader which might speed up the initial show but hardly noticeable for this particular use case. You should probably refrain from using Loader unless it is a fairly complex component you are creating as the Loader itself might be as expensive to create as a basic Text item itself.
  • QML (Qt 4.8.5): javascript function executed outside it's object

    1
    0 Votes
    1 Posts
    549 Views
    No one has replied
  • Registering a type makes the QML code not work

    5
    0 Votes
    5 Posts
    1k Views
    E
    Thanks Dot97. I tried what you said, but it didn't work... (I remaned everything in QML to FloatingMenuQML).. I think it is ok to have that with two names.... So I still have the problem... Thanks again anyway!