Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, January 2008
Using some QtGui classes in non-GUI app


Message 1 in thread

Hi.. Is it any kind of docs available about using classes from QtGui
module in non-gui app. (QCoreApplication and without X11). For example I
tried to create QPixmap for image manipulation but got runtime error
describes that this class can be used only in GUI app. However QImage has
enough features and works well..

So is it available any list of GUI classes, that _should_ work in
QCoreApplication without X11?

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: Digital signature


Message 2 in thread

I think that you should construct a QApplication object (instead of a
QCoreApplication), specifying that you want a console application - look at
the second and third constructor in the QApplication class.


Regards,
Manuel Fiorelli

Message 3 in thread

On Sat, Jan 19, 2008 at 10:06:47PM +0100, Manuel Fiorelli wrote:
> I think that you should construct a QApplication object (instead of a
> QCoreApplication), specifying that you want a console application - look at
> the second and third constructor in the QApplication class.
> 

Thanks.. Looks like second constructor looks good for me.. Currently only QImage 
features are used here, so I will stay with QCoreApplication for a while
and will try to use QApplication with disabled GUI later.

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: Digital signature


Message 4 in thread

Dmitry wrote:
> Thanks.. Looks like second constructor looks good for me.. 
> Currently only QImage features are used here, so I will 
> stay with QCoreApplication for a while and will try to use
> QApplication with disabled GUI later.

Yes, QImage is the class you want to use. QPixmap is for displaying
images, not for processing them.

Cheers,
Peter 

--
 [ signature omitted ]