unable to compile

Lubomir I. Ivanov neolit123 at gmail.com
Tue Jul 21 05:41:34 PDT 2015


On 21 July 2015 at 13:23, Miika Turkia <miika.turkia at gmail.com> wrote:
> I am getting the following error when attempting to compile on Ubuntu
> 14.04.2LTS:
>
> subsurface/printer.cpp: In member function ‘void Printer::print()’:
> subsurface/printer.cpp:144:33: error: ‘class QPrinter’ has no member
> named ‘pageLayout’
>

pageLayout() was added in Qt 5.3. do we need to support older Qt versions?

if so, Gehad you need to add some checks like:

#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
// use pageLayout()
#else
// don't use pageLayout()
#endif

avoiding QPageLayout::paintRect() would mean that you need to use
something like QPrinter::pageRect(). not 100% sure if there is even
difference between the two.

lubomir
--


More information about the subsurface mailing list