Improved behavior of GUI (Qt) application (avoided input of invalid data).