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. How to load a scrolling list of buttons from a JSON file in QML?
Forum Updated to NodeBB v4.3 + New Features

How to load a scrolling list of buttons from a JSON file in QML?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 790 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.
  • mczarnekM Offline
    mczarnekM Offline
    mczarnek
    wrote on last edited by
    #1

    I am new to QT and QML, I'm trying to load a file that contains a list of strings and puts each string within a button. I also need to be able to write new strings to this file if the user fills out a separate form and presses 'submit'. I can't know how long this list will be, so it needs to be scrollable, I'd like to use a Flickable (application is mobile and desktop) plus a scrollbar.

    I'm assuming I have to create a new component that does this? Can I link different existing components together within a new C++ component?

    Anyway I'm reading tutorials and learning what I can but if someone could point me in the right direction, it'd be much appreciated. Thank you!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Im not into QML but as far as I know it has no file IO so its often asked
      question.
      http://stackoverflow.com/questions/8894531/reading-a-line-from-a-txt-or-csv-file-in-qml-qt-quick
      AS far as I understand tit, one will do in c++ and merge with QML.

      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