Declaring QStringlist variable globally, Getting location path using QFileDialog and printing it to a lineEdit and using it in QProcess?

Well this isn't a Qt question, but a general C++ one (global variables are frowned upon these days, a more acceptable equivalent is the singleton, search SO for lots of examples). Nonetheless, one way of doing this would be create the QStringList as a static member of the class that instantiates the QFileDialog the same class will be the one that retrieved it from the dialog anyway and by storing (and returning) it statically you effectively make it global.

You should reconsider using a global variable; it's usually better to pass a reference to functions that need access to it but if you must, this is how you do it. Put a definition as normal in one of your source files.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions