I created a QFrame and added a layout which contain QSizeGrip to resize that QFrame.
Here is my code.pp:
DragWidget::DragWidget(QWidget *parent)
: QFrame(parent)
{
setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
//Set flag to resize
setWindowFlags(Qt::SubWindow);
QGridLayout *layout = new QGridLayout(this);
layout->setContentsMargins(QMargins());
layout->setSpacing(0);
//Add size grip (to resize) to layout
QSizeGrip * sizeGrip = new QSizeGrip(this);
layout->addWidget(sizeGrip, 0, 0, 1, 1, Qt::AlignBottom | Qt::AlignRight);
}
I want to design that QFrame has a background like this:

Moreover is there any way to customize the icon resize of QSizeGrip (make it more clearly...).

You can customize the QSizeGrip using style sheet. Here an example: Customizing QSizeGrip
Here the Qt style sheet documentation: Qt Style Sheets
In your case you can add this line of code:
sizeGrip->setStyleSheet("QSizeGrip { image: url(yourFolder/yourImage.png); }");
In a similar way you can customize the QFrame background, setting an image that will be repeated. See Customizing QFrame and List of properties
EDIT
Another approach is subclassing the QSizeGrip and reimplement the paintEvent() method (and maybe sizeHint() depending on the icon size). Here an example Analog Clock Example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With