2014-09-22 16:39 GMT+03:00 Allan <agande...@gmail.com>: > On 22/09/14 14:13, Jack wrote: >> >> On 2014.09.22 06:13, Allan wrote: >>> >>> When testing the CSV plugin on Linux Mint and Ubuntu, I'm having >>> difficulty because the string pixel widths differ, I assume because >>> the fonts differ. >>> >>> I'm trying now to access KMyMoneyGlobalSettings::listCellFont(), but >>> I'm getting undefined reference when linking, and I haven't found the >>> correct way to adjust CMakeLists.txt. >>> >>> How do I do this please? Thanks >>> >>> Allan >> >> >> Is it possible you are ending up with some conflict, in that some sizes >> are being calculated based on the font you request and others are being >> calculated on the font the system is actually using? Do things seem to >> be better or worse if you don't specify any font details at all? >> >> Jack > > > I'm calculating the width of a string and then applying that as a column > width, rather than relying on resizeColumntoContents(), as that works on the > full complement of rows, whereas I need just the displayed rows. > > Now that I specify the same font for the calculation and for the UI, then I > think I'm pretty well there now.
The font that the UI uses can be easily obtained using the QWidget::font() method [1]. Regards, Cristian [1] http://qt-project.org/doc/qt-4.8/qwidget.html#font-prop > > Thanks > > Allan > > > > _______________________________________________ > KMyMoney-devel mailing list > KMyMoney-devel@kde.org > https://mail.kde.org/mailman/listinfo/kmymoney-devel _______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel