{"id":219,"date":"2009-10-20T11:40:36","date_gmt":"2009-10-20T03:40:36","guid":{"rendered":"http:\/\/www.genepeng.com\/index.php\/219"},"modified":"2009-10-21T10:17:25","modified_gmt":"2009-10-21T02:17:25","slug":"qt-%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/www.genepeng.com\/index.php\/219","title":{"rendered":"QT \u5b66\u4e60\u7b14\u8bb0"},"content":{"rendered":"<ol>\n<li>The <tt>Q_OBJECT<\/tt> macro at the beginning of the class definition is necessary for all classes that define signals or slots.<\/li>\n<li>Classes that use the <tt>Q_OBJECT<\/tt> macro must have <tt>moc<\/tt> run on them. This isn&#8217;t a problem because <tt>qmake<\/tt> automatically adds the necessary rules to the makefile. But if you forget to regenerate your makefile using <tt>qmake<\/tt> and <tt>moc<\/tt> isn&#8217;t run, the linker will complain that some functions are declared but not implemented. <\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>The Q_OBJECT macro at the beginning of the class definition is necessary for all classes that define signals or slots. Classes that use the Q_OBJECT macro must have moc run on them. This isn&#8217;t a problem because qmake automatically adds the necessary rules to the makefile. But if you forget to regenerate your makefile using &#8230; <a title=\"QT \u5b66\u4e60\u7b14\u8bb0\" class=\"read-more\" href=\"https:\/\/www.genepeng.com\/index.php\/219\" aria-label=\"More on QT \u5b66\u4e60\u7b14\u8bb0\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/posts\/219"}],"collection":[{"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":2,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/posts\/219\/revisions\/222"}],"wp:attachment":[{"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}