The various Qt serial port libraries all operate asynchronously and require the Qt event loop to be running to receive data. Inside the constructor the event loop is not processing, so you receive nothing, and consequently nothing useful comes out of your remaining code. If you uncommented the while() loop your program will hang. The receive code should be in a slot connected to one of the QextSerialPort signals not in the constructor.

Your remaining code is curious and asking to crash too, but one problem at a time.