How to generate video file from QImage sequence using QMediaRecorder in Qt5 C++

You can try libqtavi. It is a wrapper around the libgwavi. API looking simple and good integration with Qt classes. But only support MJPG codec and avi format and its bigger output size than mpeg/mp4, hevc/mkv… QAviWriter writer(“demo.avi”, QSize(800, 600), 24, “MJPG”);// set framerate to 24 fps and ‘MJPG’ codec writer.setAudioFileName(“audio.wav”); // set audio track … Read more

How to create/read/write JSON files in Qt5

Example: Read json from file /* test.json */ { “appDesc”: { “description”: “SomeDescription”, “message”: “SomeMessage” }, “appName”: { “description”: “Home”, “message”: “Welcome”, “imp”:[“awesome”,”best”,”good”] } } void readJson() { QString val; QFile file; file.setFileName(“test.json”); file.open(QIODevice::ReadOnly | QIODevice::Text); val = file.readAll(); file.close(); qWarning() << val; QJsonDocument d = QJsonDocument::fromJson(val.toUtf8()); QJsonObject sett2 = d.object(); QJsonValue value = sett2.value(QString(“appName”)); … Read more

Connecting overloaded signals and slots in Qt 5

The problem here is that there are two signals with that name: QSpinBox::valueChanged(int) and QSpinBox::valueChanged(QString). From Qt 5.7, there are helper functions provided to select the desired overload, so you can write connect(spinbox, qOverload<int>(&QSpinBox::valueChanged), slider, &QSlider::setValue); For Qt 5.6 and earlier, you need to tell Qt which one you want to pick, by casting it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)