本文整理汇总了C++中MainWidget::loadResources方法的典型用法代码示例。如果您正苦于以下问题:C++ MainWidget::loadResources方法的具体用法?C++ MainWidget::loadResources怎么用?C++ MainWidget::loadResources使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWidget
的用法示例。
在下文中一共展示了MainWidget::loadResources方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setOrganizationName("deepin");
a.setApplicationName("dde-dock");
a.setApplicationDisplayName("Dock");
// install translators
QTranslator translator;
translator.load("/usr/share/dde-dock/translations/dde-dock_" + QLocale::system().name());
a.installTranslator(&translator);
// translations from dde-control-center, used by those plugins provided by dde-control-center,
// but below lines should be moved to individual plugins in the future.
QTranslator translator1;
translator1.load("/usr/share/dde-control-center/translations/dde-control-center_" + QLocale::system().name());
a.installTranslator(&translator1);
LogManager::instance()->debug_log_console_on();
LOG_INFO()<< "LogFile:" << LogManager::instance()->getlogFilePath();
if (QDBusConnection::sessionBus().registerService(DBUS_NAME)) {
QFile file("://qss/resources/dark/qss/dde-dock.qss");
if (file.open(QFile::ReadOnly)) {
QString styleSheet = QLatin1String(file.readAll());
qApp->setStyleSheet(styleSheet);
file.close();
} else {
qWarning() << "Dock Open style file errr!";
}
MainWidget w;
w.show();
qWarning() << "Start Dock, The main window has been shown.............................................................";
w.loadResources();
RegisterDdeSession();
initGtkThemeWatcher();
return a.exec();
} else {
qWarning() << "Dock is running!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
return 0;
}
}