PDA

View Full Version : mouse pressevent doesnt work inside a QListWidget



john_god
25th February 2009, 03:32
I have a aplication with a mainwindow created with the designer. The central widget is a QListWidget. But the mouse pressevent doesnt work inside the listwidget, only outside. Why ???

Also I have 2 signal slot connections when a item is clicked or doubleclicked.

If I put in comment the doubleclick connection, the click connection works fine. If I put in comment the click connection, the doubleclick connection works fine. But if I use the 2 connections at the same time, the doubleclick connection isnt triggered. Any ideas ???
My code:


connect(ui.listWidget,SIGNAL(itemClicked(QListWidg etItem*)),
this,SLOT(ListaSlot()));

connect(ui.listWidget,SIGNAL(itemDoubleClicked(QLi stWidgetItem*)),
this,SLOT(ListaSlot2Click()));