Quote Originally Posted by aamer4yu View Post
Just try this code if it works -
Qt Code:
  1. QLabel *label = new QLabel();
  2. label->setFixedSize(400,300);
  3. label->setPixmap(QPixmap("some_pic.JPG").scaled(label->size()));
  4.  
  5. QToolBar *tb = new QToolBar(label);
  6. tb->setStyleSheet("background-color : transparent ; color:white;");
  7. tb->addAction("Action 1");
  8. tb->addAction("Action 2");
  9. tb->addAction("Action 3");
  10. tb->resize(label->width(),tb->height());
  11.  
  12. QVBoxLayout *layout = new QVBoxLayout(this);
  13. layout->addWidget(label);
To copy to clipboard, switch view to plain text mode 
Put it in ctor of your custom widget.

You can also replace the stylesheet line with this one -
Qt Code:
  1. tb->setStyleSheet("QToolBar { background-color : rgba(200,0,0,100) ; color:white; border-color: transparent;} QToolButton{background-color : transparent;} ");
To copy to clipboard, switch view to plain text mode 
Sorry, it still failed!
I doubt its the display difference between QLabel::winId and QLabel. I don't know the display mechanism of them......