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 can i parser the .ini file?
Forum Updated to NodeBB v4.3 + New Features

how can i parser the .ini file?

Scheduled Pinned Locked Moved Unsolved General and Desktop
27 Posts 4 Posters 15.2k 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.
  • V victor wang

    @J.Hilk
    This is my code here
    And i got some error.
    Is there anything i need to fix?

    This is an error here

    Please help!

    FlotisableF Offline
    FlotisableF Offline
    Flotisable
    wrote on last edited by
    #21

    @victor-wang
    the ; should not at the end of foreach statement, or it will do nothing and finish the foreach statement, just like for statement.

    you should write qDebug() not qDebug, you forget the parentheses.

    V 1 Reply Last reply
    0
    • FlotisableF Flotisable

      @victor-wang
      the ; should not at the end of foreach statement, or it will do nothing and finish the foreach statement, just like for statement.

      you should write qDebug() not qDebug, you forget the parentheses.

      V Offline
      V Offline
      victor wang
      wrote on last edited by
      #22

      @Flotisable
      Sorry, i got this :)

      Besides, i got a question.
      Can i only read the key which the value is true?

      FlotisableF 1 Reply Last reply
      0
      • V victor wang

        @Flotisable
        Sorry, i got this :)

        Besides, i got a question.
        Can i only read the key which the value is true?

        FlotisableF Offline
        FlotisableF Offline
        Flotisable
        wrote on last edited by
        #23

        @victor-wang
        I think you have to write some code to test it, just read the key if it pass the test.

        V 1 Reply Last reply
        0
        • FlotisableF Flotisable

          @victor-wang
          I think you have to write some code to test it, just read the key if it pass the test.

          V Offline
          V Offline
          victor wang
          wrote on last edited by
          #24

          @Flotisable
          Can i put value into array?
          If it can, how can i do it?

          FlotisableF 1 Reply Last reply
          0
          • V victor wang

            @Flotisable
            Can i put value into array?
            If it can, how can i do it?

            FlotisableF Offline
            FlotisableF Offline
            Flotisable
            wrote on last edited by
            #25

            @victor-wang
            I think any data can be put into array, but what exactly you want ?

            V 1 Reply Last reply
            0
            • FlotisableF Flotisable

              @victor-wang
              I think any data can be put into array, but what exactly you want ?

              V Offline
              V Offline
              victor wang
              wrote on last edited by
              #26

              @Flotisable
              It is my code here

              I wanna put childkey and values into array.
              Then compare them.
              But i don't know how to do it.
              Please Help!

              FlotisableF 1 Reply Last reply
              0
              • V victor wang

                @Flotisable
                It is my code here

                I wanna put childkey and values into array.
                Then compare them.
                But i don't know how to do it.
                Please Help!

                FlotisableF Offline
                FlotisableF Offline
                Flotisable
                wrote on last edited by
                #27

                @victor-wang
                if you just want to test if the value is true, I think you can do it in the foreach statement, like

                  foreach( const QString &childkey, childkeys )
                    if( settings.value( childkey ).toString() == "true" )
                    {
                      // do what you want
                    }
                
                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 Extensions
                • Unsolved