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. QPrinter "mediaType" setting?
Qt 6.11 is out! See what's new in the release blog

QPrinter "mediaType" setting?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 274 Views
  • 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.
  • S Offline
    S Offline
    SteveFSWB
    wrote on last edited by
    #1

    Hi

    In Windows API's DEVMODE structure there is a "dmMediaType".

    https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-devmodea

    dmMediaType
    
    Specifies the type of media being printed on. The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMMEDIA_USER.
    Value 	Meaning
    DMMEDIA_STANDARD 	Plain paper.
    DMMEDIA_GLOSSY 	Glossy paper.
    DMMEDIA_TRANSPARENCY 	Transparent film.
     
    
    To retrieve a list of the available media types for a printer, use the DeviceCapabilities function with the DC_MEDIATYPES flag.
    

    I can't find the equivalent get/set function in the QPrinter class.

    Does anyone know how this can be configured when dealing with QPrinter to print jobs?

    I need to set this programmatically and not make the user navigate to the Print Preferences dialog to change the setting per print job.

    media_type.png

    Many thanks in advance for anything that helps.

    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