Debian Codegraph @

kysdk-qtwidgets/test/testcrumb/main.cpp

raw
1 /*
2 *
3 * Copyright (C) 2024, KylinSoft Co., Ltd.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 3 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this library. If not, see <https://www.gnu.org/licenses/>.
17 *
18 * Authors: Zhenyu Wang <[email protected]>
19 *
20 */
21
22 #include "widget.h"
23 #include <QApplication>
24 #include <QDebug>
25 #include <QLibraryInfo>
26 #include <QMessageBox>
27 #include <QTranslator>
28
29 int main(int argc, char *argv[])
30 {
31 QApplication a(argc, argv);
32 QString qtTransPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
33
34 QTranslator *trans_qt = new QTranslator();
35 qDebug() << qtTransPath;
36 if (trans_qt->load(QLocale(), "qt", "_", qtTransPath))
37 qApp->installTranslator(trans_qt);
38 Widget w;
39 w.show();
40 return a.exec();
41 }