Q: C++ QT Desktop Toolbar Is there any way of making a toolbar like in the application "Netop Vision" in c++ with qt?
The toolbar looked like this: http://i.stack.imgur.com/gZfKa.png
and was opened by the app automatically. It was docked to the top border of the screen and just shown when the mouse hovered. Is it possible to recreate something like this.
Thanks in advance!

A: 1.To make it look like a panel pass Qt::FramelessWindowHint flag in the constuctor of your window.
2.To dock it to the top of the monitor use QDesktopWidget().availableGeometry() to get the monitor size and move your window to the top of it.
3.To get rid of a taskbar item pass Qt::Tool flag in the constuctor of your window. So it will look like this:
MyWindowWidget(QWidget* parent)
    : QWidget(parent, Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint)
{

}

4.What you can't do with Qt is to handle global mouse events. You should use WINAPI instead to install a global hook and process all mouse events.  
a) install:  
HINSTANCE hInstance = GetModuleHandle(NULL);

HHOOK hMouseHook = SetWindowsHookEx( WH_MOUSE_LL, mouseProc, hInstance, NULL );

b) process:
LRESULT CALLBACK mouseProc (int nCode, WPARAM wParam, LPARAM lParam)
{
  MOUSEHOOKSTRUCT * pMouseStruct = (MOUSEHOOKSTRUCT *)lParam;
  if (pMouseStruct != NULL)
  {
    if(wParam == WM_MOUSEMOVE)
    {
      int x = pMouseStruct->pt.x;
      int y = pMouseStruct->pt.y;

      //g_myWindowWidget is a pointer to an instance of MyWindowWidget
      g_myWindowWidget->processMouseMove(x, y);
    }        
  }
  return CallNextHookEx(hMouseHook, nCode, wParam, lParam);
}

void MyWindowWidget::processMouseMove(int x, int y)
{
 const bool hasMouse = rect().contains(mapFromGlobal(QPoint(x, y)));
 if (hasMouse && !isVisible())
    show();
 else if (!hasMouse() && isVisible())
    hide();
}

