Options > Configure TeXstudio > Commands I changed PdfLateX to use the
-output-directory=tex option. I checked
Show Advanced Options in the bottom right corner and set all additional search paths under
Build to the used directory name.
Everything works (I can compile to PDF and preview it in the internal PDF viewer) but I don't know how I should change the
External PDF Viewer command so that it opens the PDF from the subdirectory.