Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. JSON list in QT
Forum Updated to NodeBB v4.3 + New Features

JSON list in QT

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 238 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    George_T
    wrote on last edited by
    #1

    Hi, guys. Recently I began study QT ( C++ ), and I can't understand how can do that:

    I have in the project: test.h, test.cpp and test.ui files.
    The test.ui form has two lineEdit and the botton named "save".
    And I create the class Books ( books.cpp and books.h ). This class has two parameters: a and b.
    I want to save this to parameters in class from two lineEdit in test.ui, and write them into a JSON file.
    And, of course, I will have many books in Books class.

    class Book
    {
    public:
    Book();
    QString a;
    QString b;
    };

    jsulmJ 1 Reply Last reply
    0
    • G George_T

      Hi, guys. Recently I began study QT ( C++ ), and I can't understand how can do that:

      I have in the project: test.h, test.cpp and test.ui files.
      The test.ui form has two lineEdit and the botton named "save".
      And I create the class Books ( books.cpp and books.h ). This class has two parameters: a and b.
      I want to save this to parameters in class from two lineEdit in test.ui, and write them into a JSON file.
      And, of course, I will have many books in Books class.

      class Book
      {
      public:
      Book();
      QString a;
      QString b;
      };

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @George_T What exactly are you asking?
      Did you read https://doc.qt.io/qt-6/json.html ?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved