mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2025-01-24 06:32:12 +08:00
diverse bugfixes to qmake build-system
This commit is contained in:
parent
dc715221c7
commit
25feb0b5fd
@ -23,7 +23,11 @@ int main(int argc, char* argv[])
|
||||
QLabel lab;
|
||||
|
||||
// 1. we will paint into a QPixmap
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
const qreal dpr = lab.devicePixelRatioF();
|
||||
#else
|
||||
const dpr=1.0;
|
||||
#endif
|
||||
QPixmap pix(600*dpr,400*dpr);
|
||||
pix.setDevicePixelRatio(dpr);
|
||||
pix.fill(QColor("white"));
|
||||
@ -42,13 +46,13 @@ int main(int argc, char* argv[])
|
||||
|
||||
// 3. here we do the painting
|
||||
painter.begin(&pix);
|
||||
mathText.draw(painter, Qt::TopLeftCorner, QRectF(0,0,pix.width(), pix.height()), false);
|
||||
mathText.draw(painter, Qt::AlignVCenter|Qt::AlignHCenter, QRectF(0,0,pix.width()/dpr, pix.height()/dpr), false);
|
||||
painter.end();
|
||||
|
||||
// now we display and resize the label as a window
|
||||
lab.setPixmap(pix);
|
||||
lab.show();
|
||||
lab.resize(600,400);
|
||||
lab.resize(pix.width()/dpr,pix.height()/dpr);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
@ -4,15 +4,17 @@ TEMPLATE = app
|
||||
SOURCES += jkqtmathtext_simpletest.cpp
|
||||
|
||||
CONFIG += link_prl qt
|
||||
QT += core gui xml svg
|
||||
QT += core gui
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
||||
|
||||
|
||||
DEPENDPATH += ../../lib ../../qmake/staticlib/jkqtmathtextlib
|
||||
INCLUDEPATH += ../../lib
|
||||
CONFIG (debug, debug|release) {
|
||||
DEPENDPATH += ../../qmake/staticlib/jkqtmathtextlib/debug
|
||||
LIBS += -L../../qmake/staticlib/jkqtmathtextlib/debug -ljkqtmathtextlib_debug
|
||||
} else {
|
||||
DEPENDPATH += ../../qmake/staticlib/jkqtmathtextlib/release
|
||||
LIBS += -L../../qmake/staticlib/jkqtmathtextlib/release -ljkqtmathtextlib
|
||||
}
|
||||
message("LIBS = $$LIBS")
|
||||
|
@ -1,8 +1,8 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += jkqtplotterlib jkqtmathtext_simpletest
|
||||
SUBDIRS += jkqtmathtextlib jkqtmathtext_simpletest
|
||||
|
||||
jkqtplotterlib.file = ../../qmake/staticlib/jkqtplotterlib/jkqtplotterlib.pro
|
||||
jkqtmathtextlib.file = ../../qmake/staticlib/jkqtmathtextlib/jkqtmathtextlib.pro
|
||||
|
||||
jkqtmathtext_simpletest.file=$$PWD/jkqtmathtext_simpletest.pro
|
||||
jkqtmathtext_simpletest.depends = jkqtplotterlib
|
||||
jkqtmathtext_simpletest.depends = jkqtmathtextlib
|
||||
|
@ -1,37 +1,19 @@
|
||||
include($$PWD/asana.pri)
|
||||
|
||||
LIBS +=
|
||||
|
||||
TARGET = jkqtmathtext_test
|
||||
TEMPLATE
|
||||
|
||||
SOURCES += jkqtmathtext_test.cpp \
|
||||
testform.cpp
|
||||
|
||||
RCC_DIR = rccs
|
||||
|
||||
CONFIG += link_prl qt windows
|
||||
|
||||
|
||||
TARGET = jkqtmathtext_test
|
||||
|
||||
QT += core gui svg xml
|
||||
|
||||
UI_DIR = .uics
|
||||
|
||||
HEADERS += testform.h
|
||||
|
||||
OBJECTS_DIR = .objs
|
||||
FORMS += testform.ui
|
||||
|
||||
INCLUDEPATH +=
|
||||
|
||||
MOC_DIR = .mocs
|
||||
|
||||
FORMS += \
|
||||
testform.ui
|
||||
|
||||
DESTDIR = ./
|
||||
include($$PWD/asana.pri)
|
||||
|
||||
DEFINES += AUTOLOAD_XITS_FONTS AUTOLOAD_Asana_FONTS
|
||||
|
||||
CONFIG += link_prl qt windows
|
||||
QT += core gui svg xml
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user