Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication a(argc, argv);
  4. MainWindow mw;
  5.  
  6. mw.centralWidget()->setWindowFlags(Qt::SubWindow);
  7.  
  8. QSizeGrip * sizeGrip = new QSizeGrip(mw.centralWidget());
  9.  
  10. QGridLayout * layout = new QGridLayout(mw.centralWidget());
  11.  
  12.  
  13. mw.setWindowFlags(mw.windowFlags() | Qt::FramelessWindowHint);
  14. mw.setAttribute(Qt::WA_TranslucentBackground);
  15.  
  16. qDebug() << sizeGrip->testAttribute(Qt::WA_TranslucentBackground);
  17. sizeGrip->setAttribute(Qt::WA_TranslucentBackground, false);
  18. qDebug() << sizeGrip->testAttribute(Qt::WA_TranslucentBackground);
  19. sizeGrip->setWindowFlags(sizeGrip->windowFlags() & ~Qt::FramelessWindowHint);
  20.  
  21. sizeGrip->setWindowOpacity(1.0);
  22. mw.setWindowOpacity(1.0);
  23.  
  24. layout->addWidget(sizeGrip, 0,0,1,1,Qt::AlignBottom | Qt::AlignRight);
  25. mw.centralWidget()->setStyleSheet("QWidget#a{border-image: url(:/f)}");
  26. mw.show();
  27.  
  28. return a.exec();
  29. }
To copy to clipboard, switch view to plain text mode 

Hello guys above is my code and the form it created is like this:
Capture.jpg

the problem is the size griper is composed by 9 little dot with a lot of hole in it and when my mouse hovered around on the griper it is like flashing between the <double arrow state> and <pointer state> (i guess it is caused by the TranslucentBackground attribute and those <translucent> dots in the gripper.

[Double-arrow]
Capture1.JPG

[Pointer]
Capture2.JPG

Could you help me please I would really appreciate that.