use Roboto font
This commit is contained in:
parent
241c01a30e
commit
74cecb25d3
9
main.cpp
9
main.cpp
|
@ -1,16 +1,17 @@
|
|||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
#include <QCommonStyle>
|
||||
#include <QFontDatabase>
|
||||
#include "style.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
// QCommonStyle *style = new QCommonStyle;
|
||||
// a.setStyle(style);
|
||||
int id = QFontDatabase::addApplicationFont(":/fonts/Roboto-Regular.ttf");
|
||||
QFont font(QFontDatabase::applicationFontFamilies(id).at(0));
|
||||
font.setPixelSize(14);
|
||||
|
||||
// a.setStyle(&Style::instance());
|
||||
a.setFont(font);
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
|
|
@ -96,3 +96,6 @@ HEADERS += mainwindow.h \
|
|||
lib/style.h \
|
||||
examples/iconmenuexamples.h \
|
||||
lib/scaleeffect.h
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<RCC>
|
||||
<qresource prefix="/fonts">
|
||||
<file>Roboto-Black.ttf</file>
|
||||
<file>Roboto-Bold.ttf</file>
|
||||
<file>Roboto-Light.ttf</file>
|
||||
<file>Roboto-Medium.ttf</file>
|
||||
<file>Roboto-Regular.ttf</file>
|
||||
<file>Roboto-Thin.ttf</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue