Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Multiple QPair in QList crashes application
Qt 6.12 LTS is out! See what's new in the release blog

Multiple QPair in QList crashes application

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 655 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.
  • N Offline
    N Offline
    npatil15
    wrote on last edited by
    #1

    Hello,

    I have an application where I'm storing some data for processing it further
    example: QList<QPair<QString, QList<QPair<QString, QList<QPair<QString, QList<QPair<QString, int>>>>>>>>

    For less data it's working but when I have more data in the above QList then it's crashing.

    So the question is, does use such QList is a good programming style, or is there any better alternative for this?

    Please suggest me, thanks.

    Pl45m4P 1 Reply Last reply
    0
    • N npatil15

      Hello,

      I have an application where I'm storing some data for processing it further
      example: QList<QPair<QString, QList<QPair<QString, QList<QPair<QString, QList<QPair<QString, int>>>>>>>>

      For less data it's working but when I have more data in the above QList then it's crashing.

      So the question is, does use such QList is a good programming style, or is there any better alternative for this?

      Please suggest me, thanks.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @npatil15 said in Multiple QPair in QList crashes application:

      QList<QPair<QString, QList<QPair<QString, QList<QPair<QString, QList<QPair<QString, int>>>>>>>>

      Are you even serious with this? :D

      There is no reason to create a list like this. Better think about how to re-organize your data in a better way.

      How does your data look like? What data do you want to store in such a list?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      1
      • N Offline
        N Offline
        npatil15
        wrote on last edited by npatil15
        #3

        This creates a structure like:

        • QList<QPair<Filename, QList<QPair<FrameName, QList<QPair<ClassName QList<QPair<Description, Query>>>>>>>

        Here, I have multiple files (FileName) which has multiple frames (FrameName) which has multiple classes (ClassName) which has data called Description and its query.

        So I'm reading multiple Json files and gathering some data out of it, and storing in this above variable to process it later to show in tables, charts and then again store this sorted data in Excel sheet.

        Can you please suggest me if I have such type of data then how I should go ahead?

        Pl45m4P 1 Reply Last reply
        0
        • Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Use a debugger and see where it crashes.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1
          • N npatil15

            This creates a structure like:

            • QList<QPair<Filename, QList<QPair<FrameName, QList<QPair<ClassName QList<QPair<Description, Query>>>>>>>

            Here, I have multiple files (FileName) which has multiple frames (FrameName) which has multiple classes (ClassName) which has data called Description and its query.

            So I'm reading multiple Json files and gathering some data out of it, and storing in this above variable to process it later to show in tables, charts and then again store this sorted data in Excel sheet.

            Can you please suggest me if I have such type of data then how I should go ahead?

            Pl45m4P Offline
            Pl45m4P Offline
            Pl45m4
            wrote on last edited by
            #5

            @npatil15 said in Multiple QPair in QList crashes application:

            So I'm reading multiple Json files and gathering some data out of it, and storing in this above variable to process it later to show in tables, charts and then again store this sorted data in Excel sheet.

            To do this, you don't need to have one list, that stores everything.


            If debugging is the process of removing software bugs, then programming must be the process of putting them in.

            ~E. W. Dijkstra

            1 Reply Last reply
            0

            • Login

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