[Qt-interest] [SOLVE] Re: argv & utf-8 code
Constantin Makshin
cmakshin at gmail.com
Mon Aug 2 12:35:52 CEST 2010
In that case the line "if(argc > 1)" is useless because if there are no arguments, then argc = args.count() = 1 and the loop'll be skipped.
The list returned by QCoreApplication::arguments() may be treated as cross-platform Unicode version of 'argv'.
On Monday 02 August 2010 10:54:17 Aaron Lewis wrote:
> > QStringList args = qApp->arguments();
>
> @ Makshin
>
> Ah , that's the `standard' way of handling arguments , well , i would
> use it like
>
> if(argc > 1)
> for (int i = 1; i < args.count(); ++i)
> w.readFileToBuffer(args.at(i));
>
> @ Thiago
>
> That's the problem , i should declare my encoding in my applications.
>
> Thanks
More information about the Qt-interest-old
mailing list