[Qt-interest] Detecting GUI when compiling

Felipe Ferreri Tonello eu at felipetonello.com
Thu Aug 18 23:11:55 CEST 2011


On Thursday 18 August 2011 17:50:29 Alex Strickland wrote:
> Hi
> 
> I wish to conditionally compile code depending on whether the
> application has a GUI or not (for testing). Is there a recommended way
> to detect this?

You can use QApplication::type()[1].

[1] http://doc.qt.nokia.com/4.7/qapplication.html#type

-- 
Felipe Ferreri Tonello
eu at felipetonello.com
felipetonello.com



More information about the Qt-interest-old mailing list