minor changes in README file in the code snippets

This commit is contained in:
Nikolaos Ftylitakis 2018-02-12 21:49:20 +02:00 committed by GitHub
parent 4156f88b1b
commit 69d35fb76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,8 +165,13 @@ Use the encoding function with its default settings:
* Error Correction Level: Low (L)
```cpp
QString data = "text to be encoded";
QImage barcode = QZXing::encodeData(data);
#include <QZXing.h>
int main()
{
QString data = "text to be encoded";
QImage barcode = QZXing::encodeData(data);
}
```
Or use the encoding function with custom settings:
@ -207,6 +212,8 @@ Or use the encoding function with custom settings that are passed like URL query
```qml
import QZXing 2.3
TextField {
id: inputField
text: "Hello world!"