Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] How to adjust QPrintPreviewWidget?
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] How to adjust QPrintPreviewWidget?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 945 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jan-Willem
    wrote on last edited by
    #1

    I am searching for different ways to get things done in Qt.
    At the moment I am trying to adjust the QGraphicsItem in a QPrintPreviewWidget. I did not found a way by subclassing is, so I thought it would be best to rebuild the existing QPrintPreviewWidget with only those options I need.

    Problem is the inclusion of "private/qwidget_p.h" and <private/qprinter_p.h>.
    My question is how I can rebuild a single widget without rebuilding the entire development environment?

    Someone an idea?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jan-Willem
      wrote on last edited by
      #2

      Well, last night I had some time to experiment on this old question of mine and I came up with a possilble solution.

      The first step was for me to recreate qprintpreviewwidget and when successfull, adjust it to my needs.

      So I took the sourcecode from qprintpreviewwidget and split them up in four classes, PageItem, GraphicsView, Preview and PreviewPrivate.
      After that I combined Preview and PreviewPrivate into one class Preview.

      The above gives me an almost working example, I only have to find a way to retrieve a list of pages from QPrinter or an alternative solution.

      Any ideas on this would be fine!!

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jan-Willem
        wrote on last edited by
        #3

        For now I will mark this post as solved. Although not having a working solution yet, it seems I'm almost there. I found several clues in the source of qprinter and qpaintengine_preview, so I have at the moment enough options I could try.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved