Qt Designer generate C++ code

自闭症网瘾萝莉.ら 提交于 2019-12-06 06:00:23

The menu item "Form/View Code" is exactly what you expect - it shows the generated C++ code:

As you can see from the comments in the generated file, Qt designer also uses uic (the Qt User Interface Compiler) to generate the code preview.

You can verify if uic works properly by manually creating the source code:

  • save your form to a .ui file, e.g. sample.ui
  • Run uic -o sample.h sample.ui from a command shell
  • sample.h then contains the generated source code
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!