Different behaviour inside X outside MS Visual Studio IDE - possible bug?



  • Hi, Guys

    I have built a keypad for an image viewing application that a friend (mostly) and I are building, using a QWidget with only a QGraphicsView that contains a QGraphicsScene , that contains 26 graphic items in a grid, all of a class that inherits from QGraphicsSvgItem . I have implemented the "mousePressEvent" method to make those graphic items act like buttons.

    When run from inside the IDE, both debug and release versions work as expected. Now, running the app from a file manager or even from command line, things differ: the debug version works fine, but on the release one, only a few of those buttons work, and there is no pattern I could find on which will work, which won't. So it seems to me it might be an environment mismatch, but can't find it.

    Strangely, latter on I have also implemented the methods "hoverEnterEvent" and "hoverLeaveEvent", which plays with the item opacity, and all items always react to hovering events. But many (the same ones) keeps from receiving mouse clicks.

    I am using Qt 4.7.1 , built it from sources using MS Visual Studio 2005 SP1.

    Any help greatly appreciated.

    Thanks
    Francisco


  • Moderators

    Hi Francisco

    this behaviour could be explained by different Qt libs installed on your system for instance. E.g. you have an application using older version of Qt and its installation directory is in the path.
    Can you install your application on another machine and try it there?

    BTW: There is also a SP2 available for visual studio 2005. You might want to check if an update is required, but i do not think this should have an effect as you describe.



  • Thanks for your answer

    But I did try on another machine, with the same results. Indeed, mine has 3 different Qt versions, but that another one has only one, 4.7.1

    Francisco



  • Hi, once again.

    I guess there really is a bug out there.

    I have managed to make things work using exclusively an "eventFilter" on the QGraphicsView object. But in the docs you can see that, if you return "false" on your implementation of that method, other event treatment methods should receive the event not filtered. That's not working every time, as if that program is launched inside the IDE, everything works, but from a command prompt, for instance, many SVG buttons don't work anymore - but some do!

    In time, I will build two zip files, one fully working and another working just from inside the IDE, and then issue a bug tracking.

    Thanks a lot
    Francisco


  • Moderators

    Hi Francisco

    if you are able to make it retraceable you shall issue a bug report on "JIRA":https://bugreports.qt.nokia.com/secure/Dashboard.jspa Even so, if it is not retraceable you might want to file a bug report.
    Another thing you can try is to update your Qt version. Version 4.7.3 is most recent release. There is also a list with fixed bugs. May be it has been fixed already.

    Have fun


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.