Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7705421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:51:42+00:00 2026-05-31T23:51:42+00:00

I am looking for a good data-structure to store a simple key value mapping,

  • 0

I am looking for a good data-structure to store a simple key value mapping, but with
a special key construct in place.

A key is defined as section + group + keyword and this values represents some Ini like format:

[section]  
    (group)  
        keyword = value

Per definition it must be possible to find the wanted value by using
– section, group and keyword as key
– group and keyword as key
– keyword as key

I thought about using a QHash where I could add following keys to the hasmap:
– section|group|keyword
– group|keyword
– keyword

But this would mean that I use three key’s for the same value. Are there any better ways to do this in respect of wasted memory?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:51:43+00:00Added an answer on May 31, 2026 at 11:51 pm

    QSettings already supports that but in different way. You can define any combination of / seperated texts to make Groups/SubGroups/Keys combination. But if it is “some ini kind format that already exists”, I’d suggest to write your own QSettings format and register it with QSettings::registerFormat. It should be quite easy task, and It is less work then writing whole class for reading/managing such format

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a good examples/practices on how to store and structure the data
I am looking for a good Tree data structure class. I have come across
I'm desperately looking for a data structure allowing me to perform a good amount
I'm looking for a good way to get the local application data folder for
I'm looking for good tutorial or really simple code to integrate mongokit and django
I am developing a spatial data structure, and I am looking for a quick
I'm looking for a good algorithm / method to check the data quality in
I have a data structure that represents a directed graph and I'm looking for
I'm looking for the proper data structure for this scenario. I have boost available
I am using Delphi 2009. I have a very simple data structure, with 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.