Jump to content

Translations:Development/Tutorials/First program/17/pt-br: Difference between revisions

From KDE TechBase
Juliano Assis (talk | contribs)
Created page with "Agora que fizemos toda a configuração necessária, podemos passar a fazer coisas interessantes com nosso aplicativo. Vamos criar uma pop-up box, mas vamos personalizar um do..."
 
(No difference)

Latest revision as of 20:24, 15 October 2019

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Development/Tutorials/First program)
Now we've done all the necessary setup, we can move on to doing interesting things with our application. We're going to create a popup box but we're going to customise one of the buttons. To do this customisation, we need to use a {{class|KGuiItem}} object. The first argument in the {{class|KGuiItem}} constructor is the text that will appear on the item (in our case, a button). Then we have an option of setting an icon for the button but we don't want one so we just give it <tt>QString()</tt>. We then set the tooltip (what appears when you hover over an item) and finally the "What's This?" (accessed through right-clicking or Shift-F1) text.

Agora que fizemos toda a configuração necessária, podemos passar a fazer coisas interessantes com nosso aplicativo. Vamos criar uma pop-up box, mas vamos personalizar um dos botões. Para fazer essa personalização, precisamos usar um objeto KGuiItem. O primeiro argumento no construtor KGuiItem é o texto que aparecerá no item (no nosso caso, um botão). Então temos a opção de definir um ícone para o botão, mas não queremos um, apenas fornecemos QString(). Em seguida, definimos a tooltip (é o que aparece quando você passa o mouse sobre um item) e, finalmente, o "What's This?"(acessado com o botão direito do mouse ou Shift-F1).