Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.1k Posts
  • Make QSGRenderer public for custom use?

    13
    0 Votes
    13 Posts
    4k Views
    U
    This is good news, I just read your post in the mailing lists, after double-checking that it is not an April's fool I'd say I am glad there is work being done in this direction and will be waiting for some examples.
  • QML GridView - report current selection to C++ code

    5
    0 Votes
    5 Posts
    5k Views
    napajejenunedk0N
    What I've found is that currently the easiest way to know whenever the GridView's currently selected index has changed is to create a helper class that has a Qt metasystem registered property: @ Q_PROPERTY( int selectedIndex READ selectedIndex WRITE setSelectedIndex NOTIFY selectedIndexChanged ) @ Then make your helper class accessible by QML: @ qmlRegisterType< ItemSelectionModelQmlHelper >( "Models.Tools", 1, 0, "ItemSelectionModelQmlHelper" ); @ Then create an instantiate of this class and expose it to QML: @ QDeclarativeView* const view = new QDeclarativeView; ItemSelectionModelQmlHelper* const helper = new ItemSelectionModelQmlHelper( this ); view->rootContex()->setContextProperty( "_itemSelectionModelQmlHelper", helper ); @ Then one can create the QItemSelectionModel and listen to the helper's signal, so that to set the current index of the QItemSelectionModel. Of course as mentioned above, if you use a sorting or filtration of the data being displayed in the GridView the currently selected GridView item's index may not correspond to a row in your QAbstractItemModel derived class. This won't be the case if you have done the filtration and/or sorting in C++ using the QSortFilterProxyModel. The problem with the non-coresponding index will arise only if you do the sorting/filtration in QML. It would be best if GridView has the option to specify a selection model.
  • [SOLVED]QML Slots & Cpp Signal

    3
    0 Votes
    3 Posts
    2k Views
    W
    Oops sure. ^^' Now, it's just : @C:\Dvl[...]\src\main.cpp:34: erreur : no matching function for call to 'QObject::connect(ImageManager*&, const char*, QQuickItem*&, const char*)'@ Was just a stupid problem of import...
  • [SOLVED] Custom QML element init

    3
    0 Votes
    3 Posts
    3k Views
    R
    Hm, thank you very much, I'll now go and derive from QDeclarativeParserStatus. I didn't want QDeclarativeItem because I don't need all of those built-in utils for visualization, but this status-class is exactly what I need. bq. QDeclarativeParserStatus provides a mechanism for classes instantiated by a QDeclarativeEngine to receive notification at key points in their creation. This class is often used for optimization purposes, as it allows you to defer an expensive operation until after all the properties have been set on an object.
  • QAbstractListModel, ListView and crashes

    1
    0 Votes
    1 Posts
    999 Views
    No one has replied
  • Cant use ui on others functions

    4
    0 Votes
    4 Posts
    1k Views
    J
    refresh
  • Simple QML slider app

    5
    0 Votes
    5 Posts
    2k Views
    N
    Anyone can further provide update on this ?
  • 0 Votes
    7 Posts
    6k Views
    F
    OK, thanks for the replies. I make large applications, I will not do something great with QML, but will not be small. will have many of user interface screens, maybe 30 ~ 50. do not want heavy application. Will it consume too much CPU or Memory or will it take to start?
  • Image and warning X3206: implicit truncation of vector type

    2
    0 Votes
    2 Posts
    4k Views
    C
    I don't know much about why this warning is emitted, but it happens when the (in this case, default) GLSL shader (and in this case, I assume it's a fragment shader) is compiled. We're getting well out of my area of competence, but I think that there's probably an issue with ANGLE regarding how the GLSL shader is converted to HLSL, which causes an assignment (most likely of a uniform) to a different type, causing an implicit truncation. Build your Qt with desktop openGL configuration instead of ANGLE, and you should see this go away. Cheers, Chris.
  • Scrolling using QtQuick 5.0 Canvas

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    2 Posts
    2k Views
    T
    http://stackoverflow.com/questions/9153629/regex-code-for-removing-fwd-re-etc-from-email-subject Found something for the above
  • Beginner Question: Connecting to QML Signals

    5
    0 Votes
    5 Posts
    3k Views
    S
    I have been trying to use the Qml-grid view in my code. I am on a mission to couple it with my C++ code which I have been in vain so far. I think my problem occurs when I try to generate the signal from the qml rectangle. I will definitely update you with the results once I have done with it. "super-beta-prostate.com":http://www.super-beta-prostate.com
  • Create a plugin library of reusable QML files

    5
    1 Votes
    5 Posts
    4k Views
    C
    I'm not entirely sure what you mean, so maybe my advice won't be useful. But, basically: your "QML module" will be installed to a directory (the QML import path). Your application, which imports that module, can reside wherever it likes, it just needs the correct import statement. For example, if in your application's QML file you have: @ import com.example.components 1.0 @ then the QML engine will look in $QTDIR/qml/com/example/components for the module specification file ("qmldir"). You shouldn't need to include any of the paths to anything, in the .pro/.pri files of the application itself. To answer your final question, yes it's absolutely possible to define plugins with C++ defined types - there is a section about that in the documentation. Your plugin cpp should use qmlRegisterType (and related functions) to register the C++-defined types as QML types. Cheers, Chris.
  • Qt and fork()

    4
    0 Votes
    4 Posts
    8k Views
    SGaistS
    waitForFinished blocks the event loop so converterStarted and converterFinished will be called one after the other after converterProc has ended thus you won't see "Wait!". If you just want to avoid several start of the converter and keep you UI responsive, you could disable pushButton while the converter is running.
  • 0 Votes
    4 Posts
    2k Views
    U
    Yes, it is all perfectly possible.
  • Starting with the Qt Quick Tutorial...

    4
    0 Votes
    4 Posts
    2k Views
    J
    Qt Quick 1 with built-in elements
  • 0 Votes
    10 Posts
    11k Views
    J
    The two links above doesn't work. Can anyone tell me how to solve exactly this problem? I can't connect a signal in a delegate to a slot in my C++ code...
  • About Qt help documents

    5
    0 Votes
    5 Posts
    2k Views
    J
    I re-install QT5 from .run file of QT official site, it is Ok now, thanks.
  • How to embed QTableView to QML-based GUI

    5
    0 Votes
    5 Posts
    5k Views
    P
    passing
  • Qml evaluatejavascript problem

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied