You can initialize it with the function:
QQueue<QString> make_links() {
QQueue<QString> queue;
queue.enqueue("hello world");
return queue;
}
QQueue<QString> Util::links = make_links();
I am not familiar with QT, but it is hoped that they will add support for C ++ 11 initialization lists, in which case you can initialize it as:
QQueue<QString> Util::links {"hello world"};
(UPDATE: according to the link in the Shahbaz comment, you can really do this if using C ++ 11).
source
share