Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131938

Set background color for QPdfView

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.8.1
    • GUI: Painting, PDF
    • None
    • All

    Description

      Currently, QPdfView only allows for a white background. Most pdf viewers allow you to change the background color (for accessibility). I suggest adding a simple setter and getter function to QPdfView to change the background color.

      QPdfView::setBackgroundColor(const QColor &)

      QColor QPdfView::getBackgroundColor()

       

      Other than adding an extra QColor backgroundColor to the class, and the getter and setter functions, it would only require changing one line in paintEvent.

      QPdfView::paintEvent
      ...

      painter.fillRect(pageGeometry, Qt::white);

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            jgrauman Joshua Grauman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes