[Qt-interest] Precompiled headers in Visual Studio

David Ching dc at remove-this.dcsoft.com
Mon Dec 14 03:00:35 CET 2009


"Donovan Parks" <donovan.parks at gmail.com> wrote in message 
news:8fd818a30912131303h49725817g7cd206d5ae40e3ab at mail.gmail.com...
> Hello,
>
> I'm just getting started with Qt in Visual Studio and could use a
> little help. I'd like to use precompiled headers, but can't determine
> how to set the precompiled header filename for moc files. At present,
> I have precompiled headers setup and defined in a file called
> Precompiled.hpp. This works perfectly except for one file
> (moc_myProject.cpp). This file gets automatically generated from a Qt
> Designer form. This file includes StdAfx.h. How can I modifying the
> "moc'ing" of my project so it includes Precompiled.hpp instead of
> StdAfx.h?
>

The way I get started with precompiled headers is to install the Visual 
Studio add-in then use AppWizard to create a Qt application.  In the last 
page (I think) of the wizard, there is a checkbox for Precompiled headers. 
Check it, and it will generate everything necessary to make it work.  I'm 
not sure how to change the name of the precompiled header file, sorry.

-- David
 




More information about the Qt-interest-old mailing list