I'm trying to display a QLabel on the root window on X11 with Openbox i've written this code but all i got is a gray background and no label (if i move a window the background under the window goes back to black).

Qt Code:
  1. QDesktopWidget* desk = QApplication::desktop();
  2. int primary = desk->primaryScreen();
  3. QWidget* root = desk->screen(primary);
  4. QPixmap ico = QPixmap("ico.png");
  5. QLabel label;
  6. label.setPixmap(ico);
  7. QVBoxLayout *layout = new QVBoxLayout;
  8. layout->addWidget(&label);
  9. root->setLayout(layout);
  10. root->show();
  11. root->repaint();
To copy to clipboard, switch view to plain text mode 

Is it possible to do with only qt4 or i have to write code in XLib?

Thanks