The terminal example should work. You can track the issue down by first getting the cwritersync example work.
If that is not working, try to make a loopback between the RX and TX lines which are usually the 2nd and 3rd pins of your 9-pins serial port.
Having got that working, you can go further, and try to use the cwriterasync example which is a step closer to what the terminal example is using.
Once, that is working, you can realize what you would have done wrong with the terminal example. It might still be a QtSerialPort bug, but in that case we need all your details about the hardware environment.
Also, please make sure in that case whether or not the terminal example works fine for instance on Unices.