Пример #1
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    
    DlgMain mainWin;
    mainWin.show();
    
    if (argc > 1)
        mainWin.init(argv[1]);
    else
        mainWin.init();

    return app.exec();
}
Пример #2
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    
    app.setWindowIcon(QIcon(":/images/qshapes.png"));
    
    DlgMain mainWin;
    mainWin.show();
    
    // load multiple files from command line / file manager
    for (int i = 1; i < argc; i++)
        mainWin.init (argv[1]);
    
    return app.exec(); 
}