[Interest] What is the difference.

william.crocker at analog.com william.crocker at analog.com
Mon Sep 22 19:02:58 CEST 2014


On 09/22/2014 11:33 AM, Karl Ruetz wrote:
>
> On Sep 22, 2014, at 10:25 AM, william.crocker at analog.com wrote:
>
>> On 09/22/2014 11:10 AM, Thiago Macieira wrote:
>>> On Monday 22 September 2014 11:01:23 william.crocker at analog.com wrote:
>>>> Gang:
>>>>
>>>> While we are talking about the need for a Q[Core]Application...
>>>>
>>>> What is the difference between;
>>>>
>>>>       QCoreApplication(argv,argc);
>>>>
>>>> and
>>>>
>>>>       QApplication(argc,argc,false);  // Note GUIEnabled=false
>>>
>>> It creates a QApplication, which enables a bunch of backend things, without
>>> also connecting to the display server.
>>
>> When my normally-GUI application is run "off-line"
>> (to create plot images in files as opposed to drawing
>> them on the screen) I found that I had to use the
>> second option.
>>
>> I do not remember the specifics... might have had something
>> to do with fontconfig or the use of the QImage class.
>>
>>>
>>> Note that this constructor is removed in Qt 5.
>>>
>>
>> Is that another reason why I can never use Qt 5?
>
> I have a similar problem with a “console” program that creates PDF reports that include graphics.

Yes, that is the case where I found 'GUIEnabled=false' to be the life saver.
Then my app could work without the need for an XServer connection.

> I have to use the QApplication, with connections to the Display and all that
>implies when all I really want to do is use QPainter and QPdfwriter to create a 
report.
> It is rather inconvenient, but workable.
>
> Karl
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
>




More information about the Interest mailing list