CAUTION!

CAUTION! DANGER ZONE ahead. Beware of misinformation on the open internet. Contents of the site are mere opinions and are not always facts!

Saturday, December 13, 2014

Hands-on with QT

A record of solutions to issues that were resolved to develop a C++ QT windows desktop application. Only those that are not answered by search engines!

Development environment:
Processor: x64
OS: Windows 8.1 Pro
QT: 5.1.1

Work In Progress:

1. Application exited with code -1073741515
Background: application did not start and console reports the error code.
RCA: Run the application with debugger attached. Missing DLL reported in the error dialog. Navigate to the configured output folder. Run the exe. Windows explorer reports QTCored.dll missing.
Fix: Configure the environment variable "path" with the path to QT bin folder which contains the dependent debug libraries.

1. Application exited with code 0
Background: application did not start and console reports the error code.
RCA: No cause identified for the bug even under debug mode. The application exits even before the first line of main gets executed. Create a sample GUI application identical to the application not working (QMainWindow based). Check that it runs. Add required event listeners and check it still runs. Add cpp and h files iteratively and check it runs. Stop when it doesn't run anymore! On careful examination, there is another main present written for test which is not disabled by the TEST macro!!!
RC: Multiple Main found. Otherwise, trace the buggy code that terminates the application from the correct main.
Fix: Disable the test macro.