Question: I have a Qt application wrapped up inside a DLL for plugging into 3rd party applications. When those 3rd party applications start the Qt application, the toolbar tooltips in the 3rd party applications stop working. As soon as I close the Qt application, they work again.

I recreated the problem in Visual Studio by creating a non-Qt executable (in this case an MFC MDI application with out-of-the-box settings), and a Qt Application (which I changed to a DLL). I added a menu item to the non-Qt executable, and handled the event as follows:

```
void MFCApp::OnFileLaunch()
{
   QtApp qtApp;
   qtApp.Launch();
}

```

The QtApp class doesn't expose the Qt API at all, and Launch() is implemented as follows:

```
int QtApp::Launch()
{
   int argc = 0;
   char *argv = 0;
   QApplication a(argc, &argv);
   MyMainWindow w;
   w.show();
   return a.exec();
}

```

The non-Qt application remains fully responsive while the Qt application is displayed, apart from the toolbar tooltips (and also keyboard shortcuts such as Ctrl A for Select All).

I suspect this is might be a Qt bug, but just wanted to check anyway in case it's my Launch code that's wrong.

I'm using Qt 4.5.2 by the way.

Thanks

Answer: 
You could check `if (value * 0.98 == value)` instead of `if (value == 0)`. This condition will be met exactly when `value` becomes so small (subnormal) that it has too few bits of precision for multiplication by `0.98` to yield a different result.
Wow, thanks for the quick answer everyone!

Apparently that little floating point detail was skipped in my class...
So since everyone is pretty much saying the same thing (don't compare floating points with equality since they're never really exact), does the same hold true if I used ints or doubles?

Originally I had the test as if ( value <= 0.0 ), but that gave me the same thing. 

Just ran it with the test as <= 0.005 and that seemed to be just fine!

Thanks all!

mIL3S

www.milkdrinkingcow.com