Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • How to create and access database

    2
    0 Votes
    2 Posts
    669 Views
    EddyE
    Hi, I woiuld suggest to read "this model view tutorial":http://qt-project.org/doc/qt-5/modelview.html it has many links to usefull information Have a close look at QFileSystemModel
  • [SOLVED] C++ object as property parameter

    3
    0 Votes
    3 Posts
    1k Views
    K
    Yeah, so simple, thanks. Sometimes it is hard to do the step from a strongly typed language to Javascript/QML:-)
  • Change Item in ListView in a time interval

    8
    0 Votes
    8 Posts
    3k Views
    V
    Hi again! I notice that the next item when the interval ends, it's the fifth element item. How can I correct this? It's very strange because I'm using incrementCurrentIndex() method.
  • 0 Votes
    2 Posts
    702 Views
    X
    I don't think you can do that, but there are many ways to set the value. You could use a global property and bind it to the text and then easily change it from c++ or you get the specific QML item from c++ which is not that easy I think. Depending on how often you need to do that the quick (and maybe dirty) way is to use the evaluate function of the QML engine, there you can run any valid QML code like Javascript evil function, just from c++.
  • Listview delegate using Loader gives null element

    7
    0 Votes
    7 Posts
    3k Views
    M
    It does work ( I at least get rid of all the warnings ), but I don't find that solution really clean since if myModel is null then nothing should be loaded ..
  • How can I show streaming video with QML Video (rtsp) ?

    3
    0 Votes
    3 Posts
    5k Views
    T
    look at https://github.com/RSATom/QmlVlcDemo ..
  • How to store .wav file(media file) in sqllite databse

    5
    0 Votes
    5 Posts
    1k Views
    D
    I am no expert on wav files. Perhaps you should first try to write the QByteArray to a file with QFile::write(QByteArray) and then play it as you would normally.
  • Include QML in a Qt Widget application

    Locked
    3
    0 Votes
    3 Posts
    794 Views
    SGaistS
    Closing "Duplicate":http://qt-project.org/forums/viewthread/40749/
  • QScreen for KTV multi-screen application problem.

    2
    0 Votes
    2 Posts
    822 Views
    K
    OK, I have resolved it.
  • Connecting a Qt Quick Controls signal to a C++ slot

    2
    0 Votes
    2 Posts
    2k Views
    X
    Hi, there are many ways of doing what you want, so I can just tell your how I would do this in your case. Instead of connecting a QML signal to a c++ slot I usually just call the c++ slot from c++ (without any connections), that of course depends on your c++ file but you can easily register any QObject with the QML engine and then create objects of the class form QML and also call slots and any function marked with Q_INVOKEABLE. So in your case you don't need to use the QQmlContext or anything from the QtQuick2ApplicationViewer or whatever, but you just register your model class to the QML engine and then create the model object from QML, so you can have a "save" slot in the model (if that makes sense) and just call it. to register any QObject class to the QML engine you can simply use "qmlRegisterType":http://qt-project.org/doc/qt-5.0/qtqml/qqmlengine.html#qmlRegisterType in your main.cpp (before the QML engine is created, even be before QGuiApplication): @ qmlRegisterType<YourModelClass>("YourModel", 1, 0, "YourModel"); @ and then create an object anywhere in QML with: @ import YourModel 1.0 YourModel { id: model } // in some QML function model.save() @ give it an ID like any other QML object and you can access it and call slots (and invokable methods), connect signals and use it as your model in the ListView (via the ID reference). If you want you can still create the model form c++ and use setContextProperty, if you have registered the class your should be able to invoke the slots on that object from QML but I think creating the model in QML is cleaner instead of a global context property? I hope that helps you, there might be some official tutorials on this, but this should get you started. :)
  • [SOLVED]Binding between C++ object and Listview delegate

    3
    0 Votes
    3 Posts
    2k Views
    M
    Sorry for the late answer, I got back to my code and it does work with your fix. Thanks
  • Efficiently update vector image in Qml Flickable on Android

    2
    0 Votes
    2 Posts
    1k Views
    X
    Hi, you may try and use a QOpenGLFramebufferObject instead of the QImage as the render target, also if your image doesn't change much you can cache the painted image/texture in your class I guess?
  • [Solved] SpinBox with in RowLayout

    6
    0 Votes
    6 Posts
    2k Views
    EddyE
    Thanks for the feedback here. Well appreciated!
  • 0 Votes
    1 Posts
    830 Views
    No one has replied
  • 0 Votes
    5 Posts
    5k Views
    M
    In Mac OS X it is stored in the following location: @./Library/Application Support/[ProjectName]/QML/OfflineStorage/Databases/[HASH].sqlite@
  • QtQuick (5.2.1) Windows 64bit OpenGL troubles

    2
    0 Votes
    2 Posts
    814 Views
    S
    Um this code of mine is working OK on different windows with mingw ... this is strange
  • [solved] QuickItem custom drawing: multiple colors

    3
    0 Votes
    3 Posts
    776 Views
    EddyE
    Thanks for reporting back to us of the status. Please add [solved] to the topic so everyone can see that this problem is solved. You can do that by editing your first post.
  • AnimatedImage cause the Application to crash

    1
    0 Votes
    1 Posts
    482 Views
    No one has replied
  • [Solved] cannot set property of undefined

    14
    0 Votes
    14 Posts
    6k Views
    EddyE
    [quote author="petro2033" date="1396232213"]ty all, but probles was that QtGraphicalEffects needs no dll, but needs QML file from Qt\Qt5.0.2\5.0.2\mingw47_32\qml\QtGraphicalEffects[/quote] Does that mean that you figured out the problem? If so, please mark the thread as [Solved] by editing the title of you first post.)
  • Set size for Action icon

    3
    0 Votes
    3 Posts
    2k Views
    D
    I am using Action in ToolButton / Button, but it seems it also does not provide any way to specify icon size...