[Interest] What is the difference.

Mitch Curtis mitch.curtis at digia.com
Wed Sep 24 11:12:46 CEST 2014


On 22/09/14 17:33, 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.
> 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

Can't you just use QGuiApplication?

> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest




More information about the Interest mailing list