Update the snippet for QFileDialog::saveFileContent

The snippet for QFileDialog::saveFileContent is wrong - the parameters
used are in wrong order.

Pick-to: 6.4 6.2 5.15
Change-Id: I022e8ed2ef5aeea5a44e9b10ac211893a3e24c0f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Mikolaj Boc 2022-08-15 09:33:20 +02:00 committed by Mikołaj Boc
parent ee81e1acf4
commit 08d2ae8833

View File

@ -110,5 +110,7 @@ QFileDialog::getOpenFileContent("Images (*.png *.xpm *.jpg)", fileContentReady)
//! [16]
QByteArray imageData; // obtained from e.g. QImage::save()
QFileDialog::saveFile("myimage.png", imageData);
QFileDialog::saveFileContent(imageData, "myimage.png"); // with filename hint
// OR
QFileDialog::saveFileContent(imageData); // no filename hint
//! [16]