[Development] Listview positionViewAtIndex Center not working

Matteo Brichese mbrichese at came.it
Mon May 6 17:39:53 CEST 2013


Hi everyone, I'm experiencing some problem in a Qml ListView in Qt5.0.2.

I want to make a simple listview with selected item be in the centre of the view (not at the top/bottom).

The docs tell that I can do a:
Component.onCompleted: positionViewAtIndex(index, ListView.Center)

But it doesn't work at all, this code simply put my N° index element at the beginning, same as:
Component.onCompleted: positionViewAtIndex(index, ListView.Beginning)

It's normal?

Regards.

---
Matteo Brichese
Software Engineer
mbrichese at came.it
[Came Cancelli Automatici S.p.A.]<http://www.came.com/>
Il messaggio di posta elettronica contiene informazioni di carattere confidenziale specifiche per il destinatario. Nel caso non ne siate il destinatario, segnalatelo immediatamente al mittente ed eliminate dai vostri archivi quanto ricevuto (compresi i file allegati). L'uso, la diffusione, distribuzione o riproduzione del presente messaggio e dei suoi allegati da parte di ogni altra persona costituisce reato. Rif. Decreto legislativo 30 giugno 2003, n. 196 - Codice in materia di protezione dei dati personali.

The email message contains confidential information specific to the recipient. If you are not the recipient, write it to the sender immediately and delete from your files as received (including file attachments). Use, dissemination, distribution or reproduction of this message and its attachments by any other person is a criminal offense. References Legislative Decree 30 June 2003, n. 196 - Code for the protection of personal data.

Right to opposition:
The person concerned who receives the message has the right at any time to oppose its processing for forwarding commercial messages, advertising material or direct sales proposals, by clicking on the e-mail address below (or by traditional postal services by writing to: Came Cancelli Automatici Spa, Via Martiri della LibertĂ  15, 31030 Dosson di Casier (TV) - Italy, or by sending a fax to +39 0422 4941. Furthermore the person concerned may exercise all the rights of access to the personal data as provided by art. 7, Legislative Decree no. 196/2003, including the rights to amendment, updating and deletion, by sending an e-mail to privacy at came.com<mailto:privacy at came.com>.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: camecancelliautomatici29.gif
Type: image/gif
Size: 7503 bytes
Desc: camecancelliautomatici29.gif
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130506/ae7f74a3/attachment.gif>


More information about the Development mailing list