How can i see the generated code for QtCreator ?



  • Hello All.
    If i want to see the generated code from QtCreator , where should i go and what should i see?
    In Visual Studio and C# we would simply open the .designer.cs files and see everything.
    I wonder how it is possible in QtCreator
    Thanks in advance



  • Hi, you can always open the generated files (ui_xxx.h, moc_xxx.h, xxx.moc, qrc_xxx.cpp, ...) with QtCreator just as you open normal c/c++ source files.

    These files generated by qt tools uic, moc and rcc.



  • [quote author="1+1=2" date="1373699929"]Hi, you can always open the generated files (ui_xxx.h, moc_xxx.h, xxx.moc, qrc_xxx.cpp, ...) with QtCreator just as you open normal c/c++ source files.

    These files generated by qt tools uic, moc and rcc.[/quote]
    Thanks but how can i see them through QtCreator itself ?
    I cant find those files in the project files hierarchy !


  • Lifetime Qt Champion

    No you can't because they are generated in the shadow build folder.

    You can simply open an explorer in that folder and drag the files over QtCreator's window to open them



  • Thanks alot .
    Excuse me if i sound dumb! But what is a shadow build folder?
    I checked the project directory and couldnt find any other files or folders expect those which are shown in the project hierarchy inside QtCreator!


  • Lifetime Qt Champion

    The shadow build directory is simply a folder used to store the generated and compiled code so your project folder doesn't get polluted by them. Generally you can find them beside your project folder with a name like build-myproject-Qt_4_8_5

    You can find the folder in the project tab


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.