passing arguments from command line to QT application
Hello!
I've got problem with passing arguments from command line to application:
Code:
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
MainWindow w;
w.show();
w.
myVariable = QString(argv
[1]).
toInt();
return a.exec();
}
myVariable is public. And it has very weird values. When I pass that argument to function which is printing that value on console at startup everything is ok. How can I do it?
thanks in advance
best regards
Tomasz
Re: passing arguments from command line to QT application