Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    [SOLVED] loading a variable from state.

    General and Desktop
    1
    2
    1174
    Loading More Posts
    • 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.
    • K
      kalster last edited by

      how to load the state of a variable? I tried the following code. it is working but not as expected.

      @tt = settings.value("variable").toBool();@

      if the code above is correct then i guess there is something wrong in my program code.

      1 Reply Last reply Reply Quote 0
      • K
        kalster last edited by

        I solved it with the following code. I needed the .toInt() at the end of the code.

        @tt = settings.value("variable").toInt();@

        1 Reply Last reply Reply Quote 0
        • First post
          Last post