Qt 使用c++;

Qt 使用c++;,qt,visual-c++,qt4,Qt,Visual C++,Qt4,我想使用Qt4.3.2创建一个带有密码的pdf文件,我成功创建了一个pdf文件,但我需要创建该文件的密码,我被困在这里。请帮帮我 我的代码是 QTextDocument doc; doc.setHtml("<h1>hello, I'm an head</h1>"); QPrinter printer; printer.setOutputFileName("E:\\pdf file\\file.pdf"); printer.setOutputFormat(QPrinter:

我想使用Qt4.3.2创建一个带有密码的pdf文件,我成功创建了一个pdf文件,但我需要创建该文件的密码,我被困在这里。请帮帮我

我的代码是

QTextDocument doc;
doc.setHtml("<h1>hello, I'm an head</h1>");
QPrinter printer;
printer.setOutputFileName("E:\\pdf file\\file.pdf");
printer.setOutputFormat(QPrinter::PdfFormat);
doc.print(&printer);
qtextdock;
setHtml(“你好,我是一个脑袋”);
打印机;
打印机.setOutputFileName(“E:\\pdf文件\\file.pdf”);
打印机.setOutputFormat(QPrinter::PdfFormat);
文档打印(和打印机);
这里我正在创建一个pdf文件,现在我想创建一个该文件的密码 感谢您提供的任何帮助。

如中所述,Qt不支持。您需要一个第三方库(使用您最喜欢的搜索引擎)。如中所述,Qt不支持它。你需要一个第三方库(使用你最喜欢的搜索引擎)。