[PyQt] Trouble reading a model index from an "untouched" combo box
apaku at gmx.de
Wed Jan 27 06:09:51 GMT 2010
On 26.01.10 17:41:40, Demetrius Cassidy wrote:
> I don't think you need to use the view pointer at all - it's
> returning QAbstractItemView *, which I would assume it would need to
> be casted to the proper class in C++. If that's so, by design the
> Abstract class will return an invalid index.
I don't think so ;) The function currentIndex on the view is not
virtual, so its implemented in the abstract class already properly.
And to get a model index to index into the model its easier to ask the
view for it, rather than constructing it yourself with model->index(
combobox->currentIndex(), <model-column>, QModelIndex())
You dialed 5483.
More information about the PyQt