{"id":1524,"date":"2016-09-18T02:22:25","date_gmt":"2016-09-18T00:22:25","guid":{"rendered":"https:\/\/www.ssl-id.de\/sslblog.philippgoecke.de\/?p=1524"},"modified":"2016-09-18T02:22:25","modified_gmt":"2016-09-18T00:22:25","slug":"qt-in-eclipse-on-debian","status":"publish","type":"post","link":"https:\/\/stls.eu\/blog\/2016\/09\/18\/qt-in-eclipse-on-debian\/","title":{"rendered":"Qt in Eclipse on Debian"},"content":{"rendered":"<p>install<\/p>\n<pre>apt install eclipse-cdt eclipse-cdt-qt libqt4-dev<\/pre>\n<p>create new C++ Project<br \/>\n(e.g. Hello World C++ Project)<\/p>\n<p><strong>File->New->C++ Project<\/strong><\/p>\n<p>edit Project settings and add the following includes and libraries<\/p>\n<p><strong>Project->Properties->C\/C++ Build->Settings->GCC C++ Compiler->Includes<\/strong><\/p>\n<pre>\/usr\/include\/qt4\r\n\/usr\/include\/qt4\/Qt\r\n\/usr\/include\/qt4\/QtCore\r\n\/usr\/include\/qt4\/QtGui<\/pre>\n<p><a href=\"https:\/\/www.ssl-id.de\/sslblog.philippgoecke.de\/wp-content\/uploads\/2016\/09\/EclipseIncludes.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ssl-id.de\/sslblog.philippgoecke.de\/wp-content\/uploads\/2016\/09\/EclipseIncludes-300x220.png\" alt=\"eclipseincludes\" width=\"300\" height=\"220\" class=\"alignnone size-medium wp-image-1527\" srcset=\"https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseIncludes-300x220.png 300w, https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseIncludes-768x562.png 768w, https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseIncludes-1024x750.png 1024w, https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseIncludes-410x300.png 410w, https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseIncludes.png 1172w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Project->Properties->C\/C++ Build->Settings->GCC C++ Linker->Libraries<\/strong><\/p>\n<pre>QtCore\r\nQtGui<\/pre>\n<p><a href=\"https:\/\/www.ssl-id.de\/sslblog.philippgoecke.de\/wp-content\/uploads\/2016\/09\/EclipseLibraries.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ssl-id.de\/sslblog.philippgoecke.de\/wp-content\/uploads\/2016\/09\/EclipseLibraries-300x220.png\" alt=\"eclipselibraries\" width=\"300\" height=\"220\" class=\"alignnone size-medium wp-image-1528\" srcset=\"https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseLibraries-300x220.png 300w, https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseLibraries-768x562.png 768w, https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseLibraries-1024x750.png 1024w, https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseLibraries-410x300.png 410w, https:\/\/stls.eu\/blog\/wp-content\/uploads\/2016\/09\/EclipseLibraries.png 1172w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>now you can compile and run the following code:<\/p>\n<pre>#include &lt;QApplication&gt;\r\n#include &lt;QLabel&gt;\r\n\r\nint main(int argc, char *argv[]) {\r\nQApplication QtApp(argc, argv);\r\nQLabel QtLabel;\r\nQtLabel.setText(\"!!!Hello World!!!\");\r\nQtLabel.show();\r\nQtApp.exec();\r\n}<\/pre>\n<p>compile:<br \/>\n<strong>Project->Build Project<\/strong><\/p>\n<p>Debug:<br \/>\n<strong>Run->Debug as->Local C\/C++Application<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>install apt install eclipse-cdt eclipse-cdt-qt libqt4-dev create new C++ Project (e.g. Hello World C++ Project) File->New->C++ Project edit Project settings and add the following includes and libraries Project->Properties->C\/C++ Build->Settings->GCC C++ Compiler->Includes \/usr\/include\/qt4 \/usr\/include\/qt4\/Qt \/usr\/include\/qt4\/QtCore \/usr\/include\/qt4\/QtGui Project->Properties->C\/C++ Build->Settings->GCC C++ Linker->Libraries QtCore &hellip; <a href=\"https:\/\/stls.eu\/blog\/2016\/09\/18\/qt-in-eclipse-on-debian\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,20,30],"tags":[],"class_list":["post-1524","post","type-post","status-publish","format-standard","hentry","category-c","category-debian","category-eclipse"],"_links":{"self":[{"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/posts\/1524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/comments?post=1524"}],"version-history":[{"count":9,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/posts\/1524\/revisions"}],"predecessor-version":[{"id":1535,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/posts\/1524\/revisions\/1535"}],"wp:attachment":[{"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/media?parent=1524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/categories?post=1524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stls.eu\/blog\/wp-json\/wp\/v2\/tags?post=1524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}