View Full Version : QListWidget Signal Question
Michael Druckenmiller Sr
12th April 2012, 18:08
Here is another "Signals" question from a VB-6 Newbie to pyQT and QT...
What does the reference to (QListWidgetItem *)
in void itemDoubleClicked (QListWidgetItem *)
refer to and how do I use it.
Thanks!
Zlatomir
12th April 2012, 18:36
Here (http://doc-snapshot.qt-project.org/4.8/qlistwidget.html#itemDoubleClicked) is the documentation page.
//i don't know how the python works(how the signal definition looks in python port), but in C++ that is a pointer to the item that was double-clicked.
Michael Druckenmiller Sr
12th April 2012, 20:18
OK, I can understand the Pointer. My question is, is where do you get, or how do you construct that pointer.
In other words, what would I be pointing to?
What QList property name would be used?
Zlatomir
12th April 2012, 20:25
You don't construct it, you get it from the signal - it's a built-in signal that passes a pointer to the item from the QListWidget that was double-clicked.
To that signal you connect a slot - like void doStuffForDoubleClickedItem(QListWidgetItem *item) {//use the item here}
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.