Skip to content
QtWS25 Last Chance
  • Bookmark Issue when converting HTML to PDF

    Unsolved General and Desktop pdf html bookmarks qprinter
    4
    0 Votes
    4 Posts
    736 Views
    batistaB
    @Majed-Y That's can do what you want.... [link text](link url)https://github.com/qpdf/qpdf
  • 0 Votes
    3 Posts
    631 Views
    SMEasyS
    @A-A-SEZEN Thanks, it actually works now
  • 0 Votes
    7 Posts
    2k Views
    K
    syntax from documentation for border <width>px <border-style> <border-color> That's mean it should be px after border.
  • 0 Votes
    9 Posts
    1k Views
    mrjjM
    @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 :)
  • memory leak width QPainter/QPrinter

    Unsolved General and Desktop qpainter qprinter memory leak
    18
    0 Votes
    18 Posts
    3k Views
    AaronCA
    @Christian-Ehrlicher Thanks for tracking that down. Hope Qt gets it fixed soon.
  • Printout cut from left on mac

    Solved General and Desktop qprinter macosx mac
    4
    0 Votes
    4 Posts
    577 Views
    artwawA
    Thank you @SGaist , filed a bug report.
  • QPrinter doesn't set margins below 12mm

    Solved General and Desktop qprinter margins
    9
    0 Votes
    9 Posts
    2k Views
    S
    @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.
  • QPrinter Support On Android

    Unsolved Mobile and Embedded qprinter printer android qt-android
    3
    0 Votes
    3 Posts
    1k Views
    M
    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.
  • Glyph width information is inconsistent in PDF

    Unsolved General and Desktop qprinter qpainter pdf
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    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.
  • OS printing error

    Unsolved General and Desktop qprinter os x
    2
    0 Votes
    2 Posts
    874 Views
    A
    Take a look at QtRPT print report engine and QtRptDesigner. May be it help you. You can fint QtRPT at http://www.qtrpt.tk
  • 0 Votes
    11 Posts
    5k Views
    P
    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.
  • 0 Votes
    2 Posts
    7k Views
    mrjjM
    Hi Do you have QT += printsupport in the .pro file ? Ps. If you add it. remember to run qmake.
  • 0 Votes
    3 Posts
    1k Views
    XardasX
    solution QApplication::setAttribute(Qt::AA_Use96Dpi);
  • QPaintEvent in MainWindow

    Unsolved General and Desktop qprintevent qprinter qmainwindow
    20
    0 Votes
    20 Posts
    11k Views
    DonnD
    @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?
  • Converting Enums to Strings for QPrinter

    Unsolved General and Desktop qprinter enum qt4 qmetaobject
    13
    0 Votes
    13 Posts
    6k Views
    D
    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.
  • Qwebview and printer issue(paper size)

    Unsolved General and Desktop qwebview qprinter html
    2
    0 Votes
    2 Posts
    1k Views
    N
    Anyone? Any Idea?
  • QPrinter causes SIGPIPE error

    Unsolved General and Desktop qml sigpipe qt 5.4.1 qprinter
    5
    0 Votes
    5 Posts
    2k Views
    P
    I will try to debug in QPrinter, but therefore i have to compile QT in debug mode. It will take a while..
  • PDF export heat up i.mx6

    Unsolved Mobile and Embedded i.mx6 qprinter qwebkit
    6
    0 Votes
    6 Posts
    3k Views
    P
    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.
  • QPrinter

    Unsolved General and Desktop qprinter
    6
    0 Votes
    6 Posts
    4k Views
    mrjjM
    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 } ^