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 should *always* use 'approximate' comparisons in floating point calculations. E.g., `if (abs(value) < EPS)` instead of `if ( value == 0.00 )`. `EPS` here is a small constant (depends on your requirements and datatype).

I suspect this is what's actually happening. You get to the smallest possible positive value in your datatype, like `1 * 2^(-10000)` (10000 comes from the top of my head) and now `value * 0.98 = value`. E.g., it has to be rounded either to `0` or to `total` and `0.98*total` is obviously closer to `total`.  

But that's only speculations, though. With floating point computations, you can never be sure :)
Do not directly compare floating point numbers; your "value" will probably never really be 0.0 (zero).

do something like : 

```
float smallNumber = 0.00001;
if ( value < smallNumber )
{
...
}

```