КодC++ (Qt) QPainter painter(this); QRect mRect(painter.viewport()); painter.setBrush(Qt::white); painter.setPen(QPen(Qt::green,3,Qt:
ash DotDotLine)); painter.drawRect(mRect); painter.drawLine(0,0,mRect.width(),mRect .height()); painter.drawLine(mRect.width(),0,0,mRect .height()); painter.setBrush(Qt::NoBrush); painter.setPen(QPen(Qt::blue,3)); painter.drawEllipse(mRect); painter.setPen(Qt::black); painter.setFont(QFont("Arial Black",20,QFont::Normal)); painter.drawText(mRect,Qt::AlignCenter," Printer Draw Test");вот есть такой код, но после нажатия на печать в диалоге, выводит сообщение:Код:"QPainter::begin: Paint device returned engine == 0, type: 1QPainter::viewport: Painter not activeQPainter::setBrush: Painter not activeQPainter::setPen: Painter not active"