[Qt-interest] Overridig mouseDoubleClickEvent(QMouseEvent *event)

Keshava Krishna keshavkrishna88 at gmail.com
Wed Mar 25 06:48:36 CET 2009


Hi,
i have overridden mouseDoubleClickEvent(QMouseEvent *event) in my
application...
void Win::mouseDoubleClickEvent(QMouseEvent *event)
{
    int x=event->x();
    x-=100;
    x=x/50;

    if(!ImageList[x]->isNull())
    {
        imageFileName=*linkedImageList[x];
        show_image();
      }

}

in my application there are many images displayed, by double clicking on any
of those i want the corresponding image to be maximized,,,
this works fine if i doubleclick on an area containg an image, but it gives
segmentation fault if i  double click on an empty region..
can anyone help me in debugging this??  is dat if condition not enough to
handle this (which opens an image only if click on an image) ??

Regards,
Keshava.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090325/d8bbd211/attachment.html 


More information about the Qt-interest-old mailing list