Guilo
22nd April 2010, 19:50
Hi !
I have a QLineEdit and a QListView. I use a QSortFilterProxyModel to filter my list. It works great. Then, I want to know which line is selected in my QLIstView. I use selectedindexex and QSortFilterProxyModel::data. But if I have not typed anything in the qlineedit it will give me a segfault. If I type something it works great. If I erase what I have typed it also works. In fact it only fails if nothing has never been typed in the LineEdit.
Any Idea ?
Thanks
I have a QLineEdit and a QListView. I use a QSortFilterProxyModel to filter my list. It works great. Then, I want to know which line is selected in my QLIstView. I use selectedindexex and QSortFilterProxyModel::data. But if I have not typed anything in the qlineedit it will give me a segfault. If I type something it works great. If I erase what I have typed it also works. In fact it only fails if nothing has never been typed in the LineEdit.
Any Idea ?
Thanks