3 #ifdef Q_COMPILER_RVALUE_REFS
4 #undef Q_COMPILER_RVALUE_REFS
7 #include <QApplication>
11 #ifdef QT_STATICPLUGIN
15 #if defined(Q_OS_WIN32)
16 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin
)
17 #elif defined(Q_OS_MAC)
18 Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin
)
19 #elif defined(Q_OS_UNIX)
20 Q_IMPORT_PLUGIN(QXcbIntegrationPlugin
)
25 int main(int argc
, char *argv
[])
27 QApplication
app(argc
, argv
);
29 // build command line arguments string
31 for(int i
= 1 ; i
<= argc
; i
++)
38 // if command line starts with -f show file content
39 if (arguments
.startsWith("-f "))
41 QString fileName
= arguments
.remove(0, 3);
44 if (!file
.open(QIODevice::ReadOnly
| QIODevice::Text
))
51 QByteArray line
= file
.readLine();
55 QMessageBox::information(NULL
, "message_box", content
);
57 // else show arguments in message box content
60 QMessageBox::information(NULL
, "message_box", arguments
);