{"id":42,"date":"2012-01-28T18:06:40","date_gmt":"2012-01-28T18:06:40","guid":{"rendered":"http:\/\/192.168.0.221\/wordpress\/?p=42"},"modified":"2012-01-28T18:06:40","modified_gmt":"2012-01-28T18:06:40","slug":"python-qt","status":"publish","type":"post","link":"https:\/\/ozone.me.uk\/?p=42","title":{"rendered":"Python -QT ?!"},"content":{"rendered":"<p><a title=\"Python -QT ?!\" href=\"http:\/\/distilleryimage4.instagram.com\/b02e0d6249da11e1abb01231381b65e3_7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"http:\/\/distilleryimage4.instagram.com\/b02e0d6249da11e1abb01231381b65e3_7.jpg\" alt=\"Python -QT ?!\" width=\"367\" height=\"367\" \/><\/a>I have been trying to Program some simple applications with my MAC OSX machine and Python but using a modern GUI feel.<\/p>\n<p>I found Python to be easy syntax and wanted a similarly easy interface building tool.<\/p>\n<p>I found that QT from the <a href=\"http:\/\/qt.nokia.com\/\">Nokia<\/a> site would do that but it was a long process to get it all installed properly.<\/p>\n<p>Python comes pre-installed on OSX so that bit is straight forward.<\/p>\n<p>The install of QT is a bit more complicated. Need to download the <a href=\"http:\/\/qt.nokia.com\/downloads\">SDK<\/a> form Nokia but as well the <a href=\"http:\/\/qt.nokia.com\/downloads\/downloads#qt-lib\">Libraries Package<\/a> from a second place on the Nika Website. Then you need to run the install procedures of the various packages including SIP and pyQT. (Documentation is in the downloaded directories).<\/p>\n<p>Then you have to change the configuration of the QT Creator to allow for compiling on QT even if really you will only use the &#8220;Design&#8221; part for the GUI.<\/p>\n<pre>update configuration of project\nClic Projects on left of main window\nGo to build settings \/ build steps\nClic Details\nsetting to add \"-spec macx-g++\" in the additional argument\nrebuild everything so that config change is applied<\/pre>\n<p>&nbsp;<\/p>\n<p>Once the GUI is designed on QT, save the .ui file, then &#8220;process&#8221; the file with the tool :<\/p>\n<p>then you can run the pyic4 program to convert the .ui file into a full python program.<\/p>\n<pre>pyuic4 -x mainwindow.ui -o program.py<\/pre>\n<p>Here is a quick video describing how its done : <a href=\"http:\/\/www.youtube.com\/watch?v=JOuCuLHmk3o\">Here<\/a>.<\/p>\n<p>Just got it working now on my machine and managed to get a ridiculously simple running, now need to find the time to learn the language etc&#8230;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been trying to Program some simple applications with my MAC OSX machine and Python but using a modern GUI feel. I found Python to be easy syntax and wanted a similarly easy interface building tool. I found that &hellip; <a href=\"https:\/\/ozone.me.uk\/?p=42\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-42","post","type-post","status-publish","format-standard","hentry","category-coding"],"_links":{"self":[{"href":"https:\/\/ozone.me.uk\/index.php?rest_route=\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ozone.me.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ozone.me.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ozone.me.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ozone.me.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":0,"href":"https:\/\/ozone.me.uk\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/ozone.me.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ozone.me.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ozone.me.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}