• 5944阅读
  • 2回复

有关QApplication的疑惑 [复制链接]

上一主题 下一主题
离线dulang133266
 
只看楼主 倒序阅读 楼主  发表于: 2008-12-24
— 本帖被 XChinux 执行加亮操作(2009-01-03) —
各位大虾:
    在程序中我经常会遇到这样的语句
    QStringList args = QApplication::arguments();
很疑惑不知道到底是什么意思?
请各位帮小弟解释下,thanks。
离线adang322

只看该作者 1楼 发表于: 2008-12-24
QStringList QCoreApplication::arguments ()  [static]
Returns the list of command-line arguments.
arguments().at(0) is the program name, arguments().at(1) is the first argument, and arguments().last() is the last argument.
Calling this function is slow - you should store the result in a variable when parsing the command line.
……

返回的是命令行传递进来的参数。
Linux、C/C++、QT、OpenGL、Linux/Unix socket、Python
离线wd007

只看该作者 2楼 发表于: 2008-12-25
呵呵,帮问,学习中
欢迎访问我的博客,一起学习提高
http://blog.csdn.net/qter_wd007
快速回复
限100 字节
 
上一个 下一个