samprat
samprat

Reputation: 2214

AfxGetApp()->m_lpCmdLine for QT?

I have an MFC application which makes the use of following code
AfxGetApp()->m_lpCmdLine .
Being novice in MFC I learned that AfxGetApp()->m_lpCmdLine points to a null terminated string that specifies the command line for the application .

Now IF I want to do the same in Qt how would I do it ?

I know to get the APP name I Can use QFileInfo(QApplication::applicationFilePath()).fileName()similar to AFxGetApp but how would I get commands from cmdline ?
Using 5.1 Qt. platform Windows7

Upvotes: 0

Views: 528

Answers (1)

MSalters
MSalters

Reputation: 179991

Use QCoreApplication::arguments(). You get a QStringList.

Upvotes: 1

Related Questions