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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:06:41+00:00 2026-06-04T15:06:41+00:00

I have a class member of type QStringList . I had a guess that

  • 0

I have a class member of type QStringList. I had a guess that when this class is instantiated, nex instance get such a QStringLsit with no elements in it.
I have a function that should fill in this QStringList on user interaction. However, I see with debugger that class member does not exist at function call. What could it be all about? Is there a way to initialize the QListString that I may be missing here?

  • 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-04T15:06:41+00:00Added an answer on June 4, 2026 at 3:06 pm

    QStringList should get initialized on the creation of your object automatically (unless it is a pointer). I see two possible explanations for the debugger’s behaviour:

    • Your object (of which you call the function) doesn’t get created before the function call; that means that the this pointer is invalid when the function gets entered. This may be the case if you call the function on an uninitialised pointer to your class.
    • The debugger just doesn’t show the QStringList member correctly.
    • If your member is of type QStringList* (a pointer), it doesn’t get automatically initialised on object creation. Then you’d need to do list = new QStringList(); in the constructor. But I doubt that you need a pointer to a string list here.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that had an inline member, but I later decided that
So I have a class that has the following member variables. I have get
I have class instantiated in a web service that, in a static member, holds
I have a class AudioManager with a member of type AudioBufferList * . (This
I have a class that is of type UITableViewController . This class has a
I have class A that has some primitive attributes and also member of type
When I have a class that contains pointers as member variables what type of
If I have a class with some value member that I want to store
I have a class where i have an Drawable as an member. This class
I have a class with a static std::map member variable that maps char s

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.