Answer the question
In order to leave comments, you need to log in
Qt. How to define a static QStringList?
This is how it doesn't work:
class MyClass
{
private:
static QStringList MyString;
};
QStringList MyClass::MyString << "1" << "2" << "3";
QStringList MyClass::MyString = { "1", "2", "3" };
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question