Thank you for your answer Koushik, but it's the same result as before (see attachment).
This is what finally works for me (thanks to Norbert Thoden):
//QVBoxLayout* m_VBox
QRect rect(m_VBox->itemAt(1)->geometry());
QMutex m(QMutex::NonRecursive);
m.lock();
m.tryLock(100);
auto pixmap = QGuiApplication::primaryScreen()->grabWindow(winId(),rect.x(), rect.y(), rect.width(), rect.height());
QFile file(fileUrl.toLocalFile());
file.open(QIODevice::WriteOnly);
pixmap.save(&file, "PNG");
Best regards,
Maximilian Schönenberg