Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. qprinter
    Log in to post

    • SOLVED QPrintPreviewDialog Image is not shown/Bild wird nicht gezeigt
      German • qimage qprinter qpaint qprintpreviewdi • • SMEasy  

      3
      0
      Votes
      3
      Posts
      81
      Views

      @A-A-SEZEN Thanks, it actually works now
    • UNSOLVED Qt printing using html and QTextDocument
      General and Desktop • qtquick html qprinter qtextdocument pdf • • kuntio  

      7
      0
      Votes
      7
      Posts
      174
      Views

      syntax from documentation for border <width>px <border-style> <border-color> That's mean it should be px after border.
    • SOLVED Not able to render a tableview to pdf.
      General and Desktop • rendering qprinter painter qt desktop • • sachinrd  

      9
      0
      Votes
      9
      Posts
      184
      Views

      @sachinrd You are welcome. Do notice this way of printing it only works when it can fit on one page. if it has many rows, it will not be optimal :)
    • UNSOLVED memory leak width QPainter/QPrinter
      General and Desktop • qpainter memory leak qprinter • • labrass  

      18
      0
      Votes
      18
      Posts
      656
      Views

      @Christian-Ehrlicher Thanks for tracking that down. Hope Qt gets it fixed soon.
    • SOLVED Printout cut from left on mac
      General and Desktop • mac macosx qprinter • • artwaw  

      4
      0
      Votes
      4
      Posts
      162
      Views

      Thank you @SGaist , filed a bug report.
    • SOLVED QPrinter doesn't set margins below 12mm
      General and Desktop • qprinter margins • • SimonSchroeder  

      8
      0
      Votes
      8
      Posts
      619
      Views

      @mrjj I actually want to print to an actual printer. So, using a PDF in between is not an option. Just as I said: the margins of the QPrinter::pageLayout() do not work as one would expect. In order to be able to print close to the border, you have to turn on full page mode and set the margins of the QPrinter directly. I am not entirely sure (as I have a huge code base involved converting wxWidgets to Qt), but it looks like setting the margins of QPrinter actually prints with that margin (in contrast to what the documentation suggests). For me the problems are now solved.
    • UNSOLVED QPrinter Support On Android
      Mobile and Embedded • android qprinter printer qt-android • • narayanan.krish  

      3
      0
      Votes
      3
      Posts
      433
      Views

      Hi Narayanan, Did you find any other alternative for this printer support on Android? Implementing ourselves is definitely an option but it can be quite a process if your application has to support more than 10 types of printers. Do let me know as it would be helpful piece of information.
    • UNSOLVED Glyph width information is inconsistent in PDF
      General and Desktop • qpainter qprinter pdf • • euchkatzl  

      2
      0
      Votes
      2
      Posts
      851
      Views

      Hi, You should check the bug report system to see if it's something known. If not please consider opening a new report providing your example and as many details as possible about your setup.
    • UNSOLVED OS printing error
      General and Desktop • os x qprinter • • geor  

      2
      0
      Votes
      2
      Posts
      624
      Views

      Take a look at QtRPT print report engine and QtRptDesigner. May be it help you. You can fint QtRPT at http://www.qtrpt.tk
    • SOLVED QPainter.begin returns false on prod machine
      General and Desktop • windows qpainter qprinter pdf qt5.2.1 • • PierreFIL  

      11
      0
      Votes
      11
      Posts
      3764
      Views

      OK, so now that I have launched the program with admin rights and came back with user session, the application is working (?!?) So it was neither a DLL or plugins problem, but just a weird right access blocking. I am sad I can't explain why I had to launch it once with admin session, but at least I am glad I solved my problem. Thanks anyway to those who give their time to help.
    • SOLVED Error: undefined reference to `_imp___ZN8QPrinterC1ENS_11PrinterModeE'
      General and Desktop • qprinter qprintdialog • • Olivier Ronat  

      2
      0
      Votes
      2
      Posts
      5360
      Views

      Hi Do you have QT += printsupport in the .pro file ? Ps. If you add it. remember to run qmake.
    • SOLVED Problem with printing if "windows scaling" > 100%
      General and Desktop • windows 10 qprinter • • Xardas  

      3
      0
      Votes
      3
      Posts
      1037
      Views

      solution QApplication::setAttribute(Qt::AA_Use96Dpi);
    • UNSOLVED QPaintEvent in MainWindow
      General and Desktop • qmainwindow qprinter qprintevent • • Donn  

      20
      0
      Votes
      20
      Posts
      8701
      Views

      @kshegunov I think I got it! I have included to the painterEvent the following: QPixmap pm(200, 200); pm.fill(Qt::white); setPixmap(pm); Now I can set the text from other class like: ui->label->setText("lala"); However, I think I shouldn't set Pixmap inside paintEvent - better to do it in the other class so this type of label could be also used for other labels, right? EDIT: I liked the idea of @jsulm. Could you give me some hints how to achieve it? How to get the painting functionality from a standard QLabel and then add some additional my own painting?
    • UNSOLVED Converting Enums to Strings for QPrinter
      General and Desktop • qt4 qprinter qmetaobject enum • • DougyDrumz  

      13
      0
      Votes
      13
      Posts
      4596
      Views

      Let me tone down this discussion by saying that the original reason for my question has disappeared. I misunderstood how QPrinter worked. I thought I would need the string versions of the QPrintDialog enums to pass on to lp. Turns out QPrinter does what I need to do automatically and I don't need to call lp. Thanks for the lively discussion though.
    • UNSOLVED Qwebview and printer issue(paper size)
      General and Desktop • qwebview html qprinter • • Nouriemm  

      2
      0
      Votes
      2
      Posts
      935
      Views

      Anyone? Any Idea?
    • UNSOLVED QPrinter causes SIGPIPE error
      General and Desktop • qml qt 5.4.1 qprinter sigpipe • • PhTe  

      5
      0
      Votes
      5
      Posts
      1542
      Views

      I will try to debug in QPrinter, but therefore i have to compile QT in debug mode. It will take a while..
    • UNSOLVED PDF export heat up i.mx6
      Mobile and Embedded • qprinter i.mx6 qwebkit • • PhTe  

      6
      0
      Votes
      6
      Posts
      2263
      Views

      Hey, thanks for your help. It figured out, that the problem was not the export process. Sorry :) It was the message window i show when the export is complete. I dont know why but it caused the gpu to heat up even if it was closed.
    • UNSOLVED QPrinter
      General and Desktop • qprinter • • collycrk  

      6
      0
      Votes
      6
      Posts
      3362
      Views

      Hi it seems you made print in MainWindow::print it should be in TestPrint::print( QPrinter* printer ) That is why is says "print not declared in this scope" as u seem to have pasted the code below it ? That is ok. just correct code ( get rid of print call) so first error is that you have no print function. next error is that you miss the last argument for the text. so yes, you are close to printing :) if ( dialog.exec() == QDialog::Accepted ) { // create painter for drawing print page QPainter painter( &printer ); int w = printer.pageRect().width(); int h = printer.pageRect().height(); QRect page( 0, 0, w, h ); // create a font appropriate to page size QFont font = painter.font(); font.setPixelSize( (w+h) / 100 ); painter.setFont( font ); // draw labels in corners of page painter.drawText( page, Qt::AlignTop | Qt::AlignLeft, "QSimulate" ); painter.drawText( page, Qt::AlignBottom | Qt::AlignLeft, QString(getenv("USER")) ); //painter.drawText( page, Qt::AlignBottom | Qt::AlignRight, // QDateTime::currentDateTime().toString( Qt::DefaultLocaleShortDate ) ); // draw simulated landscape page.adjust( w/20, h/20, -w/20, -h/20 ); painter.drawText( &painter, page ); //testprint.cpp:78: error: no matching function for call to 'QPainter::drawText(QPainter*, QRect&)' // here you have no text?? // look at the others, you need the last argument } ^
    • UNSOLVED Printing QWebView wia QPrinter exceeds page in QPrintPreviewDialog
      General and Desktop • qwebview html qprinter qprintpreviewdi • • SebastianS  

      1
      0
      Votes
      1
      Posts
      656
      Views

      No one has replied

    • UNSOLVED Create QPrinter is very slow under Qt5
      General and Desktop • qt5.5 qprinter slow qt4.8.7 qelapsedtimer • • cfdev  

      6
      0
      Votes
      6
      Posts
      2414
      Views

      Hi, seems that for some reason on your Windows machine QPrinter is very slow. I suggest to open a BUGREPORT; provide as many information as you can
    • QPrintPreviewDialog not responding to page or printer settings on Mac OS X (10.10.3 Yosemite)
      General and Desktop • mac os x qprinter qprintpreviewdi qprintpreviewwi qprintdialog qpagesetupdialo remote printer • • kenchan  

      5
      0
      Votes
      5
      Posts
      2185
      Views

      @SGaist Thanks, I will take a look at that.
    • Resizing image to fit printing page
      General and Desktop • qpainter image resize qprinter • • darkp03  

      1
      0
      Votes
      1
      Posts
      480
      Views

      No one has replied

    • QPrinter custom CUPS options
      General and Desktop • qprinter custom options cups • • Far Jmp  

      2
      0
      Votes
      2
      Posts
      841
      Views

      Hi, I don't think it's possible. IMHO the easiest way to achieve this is to print to a temporary PDF file and then call lp with the needed options by yourself. Cheers!