themeinfotab.cpp 617 B

12345678910111213141516171819202122
  1. #include "themeinfotab.h"
  2. themeInfoTab::themeInfoTab()
  3. {
  4. }
  5. void themeInfoTab::updateData(QString jsonData)
  6. {
  7. //Convert the jsonData var to QJsonObject
  8. QJsonDocument jsonDataDocument = QJsonDocument::fromJson(jsonData.toUtf8());
  9. QJsonObject jsonDataDocumentObject = jsonDataDocument.object();
  10. QString themeName, themeVer, themeDesc;
  11. themeName = jsonDataDocumentObject.value("themeName").toString();
  12. themeVer = jsonDataDocumentObject.value("themeVer").toString();
  13. themeDesc = jsonDataDocumentObject.value("themeDesc").toString();
  14. emit setTextBox(themeName, themeVer, themeDesc);
  15. }