[Qt-interest] Can you spot my mistake.
John McClurkin
jwm at nei.nih.gov
Mon Aug 24 13:56:01 CEST 2009
Andrew Hodgkinson wrote:
> On 24/08/2009 00:12, william.crocker at analog.com wrote:
>
>>> Your myapp constructor doenst take in a reference to argc
>>
>> That is correct.
>
> So why *is* QApplication's constructor defined with "int & argc", rather
> than just "int argc"? Isn't that just asking for trouble?
>
>> Easy to miss and of dire consequences.
>
> Out of interest, given it took a long time for the symptoms to surface -
> what were they? Others on the list (including me) may encounter the same
> thing one day and who knows, they may remember this thread.
>
When I made that mistake it didn't take long at all for symptoms to
surface. My application crashed on start up. True, my app takes command
line arguments.
More information about the Qt-interest-old
mailing list