Quantcast
Viewing all articles
Browse latest Browse all 4972

Using an instantiated item as ListView delegate

The problem is, that I want to resize the child item to the size of the delegate item and not the delegate to the child. I tried this by calling the following method after I changed the model: void QuickItemMngrServiceImpl::anchorItems() {     QQmlContext *ctxt = m_viewer->rootContext();       Q_FOREACH(QObject *item, m_items)     {         QQmlExpression expr(ctxt, item, "parent");         QQmlProperty prop(item, "anchors.fill");         prop.write(expr.evaluate());     } } But this works only for the items, that are visible at the beginning.

Viewing all articles
Browse latest Browse all 4972

Trending Articles