我想通过我的打印机打印一些消息,但是编译时什么也没有发生。我的代码有什么问题?
QPrinter printer(QPrinter::HighResolution);
printer.setCreator("Me");
printer.setDocName("Test1");
QPrintDialog *PrintConfiguration = new QPrintDialog(&printer,this);
PrintConfiguration->show();
QPainter *painter = new QPainter(&printer);
painter.drawText(10,10,ui->textEdit->toPlainText());