Results 1 to 4 of 4

Thread: read json file data to respective text fields

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: read json file data to respective text fields

    You use QJsonDocument to parse the JSON data, extract the values you need and then call setText() on your text fields.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    shoeb (14th April 2016)

  3. #2
    Join Date
    Mar 2016
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android
    Thanks
    4

    Default Re: read json file data to respective text fields

    It worked.. thanks


    Added after 6 minutes:


    Hi.. thanks for help.. one more question.. On menu bar under help, i have a shortcut button and after click on that button i want to open new window with list of shortcut's.

    I am able to open new window but not getting how to display list? how should i proceed?

    --Shoeb
    Last edited by shoeb; 14th April 2016 at 12:44.

  4. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: read json file data to respective text fields

    If you mean shortcuts on QActions, then you need some way to get all QActions, e.g. by storing their pointers in a QList member.
    Then you can iterate through that list and get the name shortcut from each and put those into e.g. a QTableWidget

    Cheers,
    _

  5. The following user says thank you to anda_skoa for this useful post:

    shoeb (15th April 2016)

Similar Threads

  1. Data gets overwritten in Json file
    By shoeb in forum Newbie
    Replies: 1
    Last Post: 6th April 2016, 20:57
  2. not able to save form data to json file
    By shoeb in forum Newbie
    Replies: 4
    Last Post: 1st April 2016, 12:23
  3. QlineEdit with constant text and editable text fields
    By arunpk in forum Qt Programming
    Replies: 6
    Last Post: 17th November 2015, 13:38
  4. Replies: 2
    Last Post: 21st February 2013, 07:05
  5. Replies: 8
    Last Post: 8th May 2012, 10:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.