1..ui生成.h,.cpp文件:
(1)、用命令
uic -o hello.h hello.ui<wbr><wbr><wbr><wbr>//注意这个是生成头文件的</wbr></wbr></wbr></wbr>
uic -i hello.h -o hello.cpp hello.ui<wbr>///这时生成与hello.h相对应的hello.cpp文件</wbr>
(2)、
uic -o hello.h hello.ui
uic -o hello.cpp impl hello.h hello.ui<wbr><wbr><wbr>//<wbr>这也是 生成 与hello.h相对应的hello.cpp文件</wbr></wbr></wbr></wbr>
<wbr><p style="margin-top:0px; margin-bottom:10px; padding-top:0px; padding-bottom:0px"> 2.moc.exe xxx.h -o moc_xxx.cpp。</p> <p style="margin-top:0px; margin-bottom:10px; padding-top:0px; padding-bottom:0px"> 3.rcc.exe -name xxxxxx.qrc-oqrc_xxx.cpp</p> <p style="margin-top:0px; margin-bottom:10px; padding-top:0px; padding-bottom:0px"> 4.把moc_xxx.cpp添加到工程里面。</p> <p style="margin-top:0px; margin-bottom:10px; padding-top:0px; padding-bottom:0px"> 5.直接运行编译。</p> <p style="margin-top:0px; margin-bottom:10px; padding-top:0px; padding-bottom:0px"> 这样的好处:无需qmake -project,qmake。</p> </wbr>