QML source for Flickable?

  • Is there a QML source for Flickable? This link says its based on Item, so I'd assume it has a source in qml like all the other qml quick controls.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    AFAIK, it comes from the private QQuickFlickable class in the QtDeclarative module.

  • @SGaist Ok, thank you. Looks like there is not an actual flickable.qml. But this gets me started in the right direction.

  • @JeTSpice Flickable isn't actually part of Controls 1 or 2, it's part of Quick proper. I think Quick types are implemented only in C++. "Inherits" in the documentation doesn't mean the same as component inheritance in QML which you write in qml files. At least Controls 2 types have .qml files in Qt but they are for visual appearance (themes) implementation. In Quick proper only few types have actual visual appearance at all (rectangle, text). The C++ implementations aren't for the faint of heart like me.

  • @Eeli-K Ah, thanks for that. Being a bit faint of heart myself, and nervously attempting to avoid long hours of maintenance/troubleshooting c++, I'm re-doing the ui framework in pure qml. The thought was I could cheat and copy-paste the flickable script, but looks like I'll have to do something from scratch. Hope its still responsive enough..

  • @JeTSpice Just in case you're intrested in seeing the code it's here: http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/items. Do you mean you don't want to use Quick or Controls at all?

  • @Eeli-K (sorry was not watching this thread) @Eeli K I'm building a ui framework using pure QML. I'm using basic Controls like Item, Rectangle, Loader, and Text, but not the out-of-the-box Button, Checkbox, TextField. Instead, the more complex/specific controls will "subclass" the basic custom controls.

  • @JeTSpice OK, so you're using Quick. QML is a language, Quick includes Item, Rectangle, Loader, Text and also Flickable while Button, TextField etc. are part of Quick Controls. I just wonder why you don't want to use Flickable when you already use other basic Quick types.

  • @Eeli-K Mostly for control over the components. The app has a hierarchy of users, each one needing distinct branding, permissions, layout, control types, etc., and needs to work on all the operating systems and devices. My experience says to be able to access all source code helps to avoid bottlenecks later on. I'm like molasses in C++ so pure QML is going to be a lot faster for me. I may end up using the Flickable, but if I can extend my own Container.qml to include flick-ability, then that's potentially easier for maintenance.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.