[Interest] QPixmap : cannot create a qpixmap when no gui is being used

Scott Aron Bloom scott.bloom at onshorecs.com
Fri Jan 3 19:29:25 CET 2014


Use QCoreApplication when gui is false…

From: etienne.sandre.chardonnal at gmail.com [mailto:etienne.sandre.chardonnal at gmail.com] On Behalf Of Etienne Sandré-Chardonnal
Sent: Friday, January 3, 2014 10:14 AM
To: Scott Aron Bloom
Cc: interest at qt-project.org
Subject: Re: [Interest] QPixmap : cannot create a qpixmap when no gui is being used

Yes but... Why is "new QApplication(argc,argv,gui)" trying to create QPixmaps when gui=false?

2014/1/3 Scott Aron Bloom <scott.bloom at onshorecs.com<mailto:scott.bloom at onshorecs.com>>
The issue is, you can run most of the GUI components, in non-gui mode..

Scott

From: interest-bounces+scott.bloom=onshorecs.com at qt-project.org<mailto:onshorecs.com at qt-project.org> [mailto:interest-bounces+scott.bloom<mailto:interest-bounces%2Bscott.bloom>=onshorecs.com at qt-project.org<mailto:onshorecs.com at qt-project.org>] On Behalf Of Etienne Sandré-Chardonnal
Sent: Friday, January 3, 2014 9:03 AM
To: interest at qt-project.org<mailto:interest at qt-project.org>
Subject: [Interest] QPixmap : cannot create a qpixmap when no gui is being used

Dear all,

I have the following main function:

int main(int argc, char *argv[])

{

        //Check if gui is required (no parameters given, or "-gui" parameter)

        bool gui;

        if( argc<=1 || hasGuiParam(argc, argv) )

               gui = true;

        else

               gui = false;



        QCoreApplication * a = new QApplication(argc, argv, gui);


        ...
}



And I get the title error (cannot create QPixmap with no gui) at the QApplication creation (not after)




What is wrong? That's the very start of the app.

Thanks,

Etienne


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140103/b459b9fa/attachment.html>


More information about the Interest mailing list