Thanks for your report. I can confirm that this has indeed changed with Qt 5.
Please save the appropriate attached “offscreen” plugin to the “platforms” directory of your QCAD installation and unpack it (gunzip libqoffscreen.so.gz). You might also have to make it executable (chmod a+x libqoffscreen.so).
You can then run dwg2pdf (and other command line utilities) with the command line switch -platform offscreen:
./dwg2pdf -platform offscreen -o out.pdf in.dxf
If you are having problems with getting texts rendered, you might have to set the QT_QPA_FONTDIR environment variable to a path which contains the fonts you want to use. libqoffscreen.so.gz (53 KB) libqoffscreen.so.gz (57 KB)
QCAD 3.16.4 is now available. The new Linux packages include the offscreen plugin as well as Qt fonts. Usage information also has been updated accordingly.
Hello Andrew, setting DISPLAY=“” is the quickest way to test how it works on a headless system. I intend to do this so I took the time to make it run and some magic tools lead the way - This is the expanded command 3) from above with ltrace added:
Remember that recently you dropped “-style plastique” from the starter batch? I did suggest that e_confused A consolidated patch for dwg2pdf soon to appear in flyspray…
Hello Andrew, the style=“” flag here does not help from reaching out to GTK, when DISPLAY is not set; while setting QT_STYLE_OVERRIDE=“” does. (Also -style=“asdf” works!)
Your are right, that the tools should not set platform, all the fonts are gone then!
PS: From strace I learned, that qcad-bin looks into /home/andrew/opt/Qt/… Are these search paths hardcoded? I guess they should not be there.