void MainForm::resizeEvent(QResizeEvent * /* event */)
{
QImage image(this->size(), QImage::Format_Mono);
image.fill(0);
if(!this->isFullScreen() && !this->isMaximized())
{
image.setPixel(0, 0, 1); image.setPixel(1, 0, 1); image.setPixel(2, 0, 1); image.setPixel(3, 0, 1);
image.setPixel(0, 1, 1); image.setPixel(1, 1, 1);
image.setPixel(0, 2, 1);
image.setPixel(0, 3, 1);
image.setPixel(width() - 4, 0, 1); image.setPixel(width() - 3, 0, 1); image.setPixel(width() - 2, 0, 1); image.setPixel(width() - 1, 0, 1);
image.setPixel(width() - 2, 1, 1); image.setPixel(width() - 1, 1, 1);
image.setPixel(width() - 1, 2, 1);
image.setPixel(width() - 1, 3, 1);
image.setPixel(0, height() - 4, 1);
image.setPixel(0, height() - 3, 1);
image.setPixel(0, height() - 2, 1); image.setPixel(1, height() - 2, 1);
image.setPixel(0, height() - 1, 1); image.setPixel(1, height() - 1, 1); image.setPixel(2, height() - 1, 1); image.setPixel(3, height() - 1, 1);
image.setPixel(width() - 1, height() - 4, 1);
image.setPixel(width() - 1, height() - 3, 1);
image.setPixel(width() - 2, height() - 2, 1); image.setPixel(width() - 1, height() - 2, 1);
image.setPixel(width() - 4, height() - 1, 1); image.setPixel(width() - 3, height() - 1, 1); image.setPixel(width() - 2, height() - 1, 1); image.setPixel(width() - 1, height() - 1, 1);
}
this->setMask(QPixmap::fromImage(image));
}