PDA

View Full Version : Subclassing QuickItem



codeman
9th May 2014, 13:33
Hello friends,

does anybody out there subclass quickitem class? I would like to create custom QQuickItem. For example a combobox with a Tabwidget.

What are the main steps? Are any Documentaation on subclassing QuickItem?

anda_skoa
9th May 2014, 15:18
Can't really imagine how a combobox with a tabwidget would look like, but could you not just aggregate those two controls into one?

Cheers,
_

codeman
9th May 2014, 21:38
:) I mean a combobox and a tabwidget in a vertical layout. Depending on combo index changing the content on the tabwidget has to be also changed.
I would like to make this on c++ side due to performace aspects. I have seen some examples on how to create custom drawing in which qquickpainted item was subclassed. But my focus is how can I put standard elements like qbutton, qcombobox, qtabwidget etc together and make it a custom control which
I can provide to qml as an item. That s it.

anda_skoa
10th May 2014, 11:31
What kind of performance do you expect to gain by wiring the combobox's current index property to the tab widget's?
In QML that is a property binding so the composite component it probably done in some minutes.

Reimplementing a combo box and a tab widget with all their functionality it more likely in the range of one or more months.

Cheers,
_