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 8366291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:52:48+00:00 2026-06-09T12:52:48+00:00

I wan’t to display a message, only on the first usage of application, i.e.

  • 0

I wan’t to display a message, only on the first usage of application, i.e. a piece of code should be executed only once, when application is first time invoked. I tried using QSettings, but couldn’t work out any way.

if(firstTime)
   {
      //do something!
   }
  • 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-06-09T12:52:49+00:00Added an answer on June 9, 2026 at 12:52 pm

    Just check QSettings for some value at launch. If it doesn’t exist, then its a first launch. After that, set the variable so it will be found each subsequent load.

    In PyQt4 it would look like this (I am sure you can translate to C++):

    settings = QSettings("foo.plist", QSettings.NativeFormat)
    
    if not settings.contains('hasLaunched'):
        # this is our first time! Weee
    
    # no matter what, set the value for the future
    settings.setValue('hasLaunched', 1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Jnews Display list Content: http://i204.photobucket.com/albums/bb267/kellyshl/Untitled.png i wan to know how to make it like
I wan't to divide my CI into multiple applications. I should say that it
I wan't to register the OnMouseOver and OnMouseOut-Event for an Image from the Code
Lets say I wan't to add 1 to an integer. This will only be
I wan't to add a subclass of UIViewController to a NSMutableDictionary which should be
I want to display a digital timer in my WP7 application. Actually i am
I'm working with some Core Animation for the first time and in the process
i wan to display the string line by line...what changes i shd make in
I feel that I might be overlooking something here. I wan to display the
I wan't to do some calculated pixelart with OpenCL and display this directly on

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.