Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Windows platform plugin with and without DirectWrite options in the same build
Qt 6.11 is out! See what's new in the release blog

Windows platform plugin with and without DirectWrite options in the same build

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.5k 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.
  • S Offline
    S Offline
    stephenju
    wrote on last edited by
    #1

    Is it possible to have Windows platform plugin with and without DirectWrite in the same build? What I want is a build that produces both the default non-DW version of qwindows.dll and a DW enabled version named, say, qwindows_dw.dll. Our installer will then handle the installation of the correct one according to user's Windows version.

    The first part of the question is: Is Windows platform plugin the only part of Qt that is required for DirectWrite support?

    The second question is then how do I change the build to produce both versions of the DLL? My current plan is:

    1. Duplicate the whole platforms/windows directory and name it platforms/windows_dw.
    2. Change the target to qwindows_dw in platform/windows_dw/windows.pro.
    3. Add directwrite to QT_CONFIG in platform/windows_dw/windows.pro.
    4. Add windows_dw to SUBDIRS in platforms.pro

    Also. Is there a way to control which platform plugin DLL to load at runtime?

    Thanks.

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, re. selecting with platform plugin DLL to load at runtime, try calling
      "setLibraryPaths":http://qt-project.org/doc/qt-4.8/qcoreapplication.html#setLibraryPaths

      Note: you should do it before plugin loading time, which is in QApplication's constructor (e.g. QApplication a(argc, argv); in your main.cpp)

      EDIT: forgot to mention, when loading plugins, the filenames are immaterial, so you have to store your different qwindows.dll flavors in different directories.

      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