Author Topic: Qt GUI support within CodeBlocks  (Read 7291 times)

Offline wonopon

  • Single posting newcomer
  • *
  • Posts: 4
Qt GUI support within CodeBlocks
« on: November 23, 2011, 02:27:31 am »
Hey, I would like to know if it's possible to write the code for a Qt GUI app within CodeBlocks, and be able to compile it. I can't seem to be able to get Qt scripts compiled on my CodeBlocks (I DONT MEAN DESIGNING THE GUI!) Even after  I included all of the Qt include folders, the error message still appears that there is no such file or directory. Can anyone please give me a quick guide on how to properly set up CodeBlocks to be able to compile Qt scripts? thank you so much :)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Qt GUI support within CodeBlocks
« Reply #1 on: November 23, 2011, 03:14:52 am »
If you create a QT project from the included Code::Blocks template, does it work?

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Qt GUI support within CodeBlocks
« Reply #2 on: November 23, 2011, 12:56:04 pm »
Source files including the 'Q_OBJECT' or something like that need to be compiled by the 'moc' compiler of Qt. So when u start to build, compiler can't find the file that should have been already compiled by 'moc' compiler. There was a solution on the forum somewhere which was to adjust compilation priorities and add appropriate custom compile commands to make the file ready before the compiler starts looking for it.