I have created the MainWindow with this code
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
// MainWindow Constructor
ui->setupUi(this);
loadFile();
}
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
// MainWindow Constructor
ui->setupUi(this);
loadFile();
}
To copy to clipboard, switch view to plain text mode
then used the print method as a slot
264 void MainWindow::Print()
265 {
266 NotImplemented();
267
269 printer.setOutputFileName("Attenuation_Calculator.pdf");
271 MainWindow.render(&printer);
272
273 }
264 void MainWindow::Print()
265 {
266 NotImplemented();
267
268 QPrinter printer;
269 printer.setOutputFileName("Attenuation_Calculator.pdf");
270 QPrintDialog(&printer).exec();
271 MainWindow.render(&printer);
272
273 }
To copy to clipboard, switch view to plain text mode
then error
C2143: syntax error : missing ';' before '.'
why...when the auto fill allows me to select .render as a method of MainWindow?
Bookmarks