Archived:Exemplos de QWidgets
hamishwillee
(Talk | contribs) m (moved Exemplos de Widgets, em Qt para Symbian to Exemplos de QWidgets: Improved title) |
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot update) |
||
| Line 1: | Line 1: | ||
| − | {{ | + | {{Archived|language=Lang-Portuguese|timestamp=20120216044643|user=[[User:Hamishwillee|<br />----]]|[[:Category:Qt Quick|Qt Quick]] should be used for all UI development on mobile devices. The approach described in this article (based on {{Qapiname|QWidget}}) is deprecated.}} |
| − | | | + | {{ArticleMetaData <!-- v1.2 --> |
| − | | | + | |
| − | + | ||
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | + | ||
| − | + | ||
| − | + | ||
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) --> | |sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) --> | ||
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| − | |sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | + | |devices= N95-1 |
| − | |devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) --> | + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> |
| − | |signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | + | |platform= S60 3rd Edition, FP1, FP2 |
| − | |capabilities=<!-- Capabilities required (e.g. Location, NetworkServices. | + | |devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) --> |
| − | |author=[[User:Cabezonxdg]] | + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> |
| + | |signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= QTextEdit, QSpinBox, QSlider, QPushButton | ||
| + | |language= Lang-Portuguese | ||
| + | |translated-by= <!-- [[User:XXXX]] --> | ||
| + | |translated-from-title= <!-- Title only --> | ||
| + | |translated-from-id= <!-- Id of translated revision --> | ||
| + | |review-by= <!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp= <!-- After re-review: YYYYMMDD --> | ||
| + | |update-by= <!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp= <!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate= 20090825 | ||
| + | |author= [[User:Cabezonxdg]] | ||
| + | <!-- The following are not in current metadata --> | ||
| + | |subcategory= ... | ||
}} | }} | ||
<br> | <br> | ||
| − | A definição de Widgets pode ser encontrada no artigo [[Widgets em Qt]]. | + | A definição de Widgets pode ser encontrada no artigo [[Widgets, em Qt]]. |
= Introdução = | = Introdução = | ||
| Line 24: | Line 31: | ||
= Pré-requisitos = | = Pré-requisitos = | ||
| − | * Baixe e instale a versão atual do Qt | + | * Baixe e instale a versão atual do Qt segundo as instruções [[Qt (Portuguese)|deste artigo]]. |
= Exemplos = | = Exemplos = | ||
| Line 49: | Line 56: | ||
</code> | </code> | ||
| − | [[ | + | [[File:SliderQt.PNG|center]] |
<div align=center>'''Exemplos de Widget: QSpinBox e QSlider'''</div> | <div align=center>'''Exemplos de Widget: QSpinBox e QSlider'''</div> | ||
| Line 65: | Line 72: | ||
} | } | ||
</code> | </code> | ||
| − | [[ | + | [[File:BotaoQt.PNG|center]] |
<div align=center>'''Exemplos de Widget: QPushButton'''</div> | <div align=center>'''Exemplos de Widget: QPushButton'''</div> | ||
| Line 81: | Line 88: | ||
} | } | ||
</code> | </code> | ||
| − | [[ | + | [[File:CampoTextoQt.PNG|center]] |
<div align=center>'''Exemplos de Widget: QTextEdit'''</div> | <div align=center>'''Exemplos de Widget: QTextEdit'''</div> | ||
[[Category:Lang-Portuguese]] | [[Category:Lang-Portuguese]] | ||
| − | [[Category: | + | [[Category:QWidget UI]] |
| − | [[Category:Code | + | [[Category:Code Snippet]][[Category:MeeGo]] [[Category:Symbian]] |
Revision as of 07:46, 16 February 2012
Aquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.
Qt Quick should be used for all UI development on mobile devices. The approach described in this article (based on QWidget) is deprecated.
Qt Quick should be used for all UI development on mobile devices. The approach described in this article (based on QWidget) is deprecated.
Dados do artigo
Testado com
Aparelho(s): N95-1
Compatibilidade
Plataforma(s): S60 3rd Edition, FP1, FP2
Artigo
Palavras-chave: QTextEdit, QSpinBox, QSlider, QPushButton
Criado por cabezonxdg
em 25 Aug 2009
Última alteração feita por hamishwillee
em 16 Feb 2012
A definição de Widgets pode ser encontrada no artigo Widgets, em Qt.
Contents |
Introdução
Widgets são elementos visuais que quando combinados formam a interface do usuário de uma aplicação Qt. Abaixo são listado alguns exemplos de widgets:
Pré-requisitos
- Baixe e instale a versão atual do Qt segundo as instruções deste artigo.
Exemplos
QSpinBox e QSlider
#include <QSlider>
#include <QSpinBox>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget* w = new QWidget();
QHBoxLayout* l = new QHBoxLayout();
QSlider* sl = new QSlider( Qt::Horizontal );
QSpinBox* sb = new QSpinBox();
l->addWidget( sb );
l->addWidget( sl );
w->setLayout( l );
w->show();
return app.exec();
}
Exemplos de Widget: QSpinBox e QSlider
QPushButton
#include <QPushButton>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton* b = new QPushButton("Botão em Qt");
b->show();
return app.exec();
}
Exemplos de Widget: QPushButton
QTextEdit
#include <QTextEdit>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTextEdit* t = new QTextEdit("Campo de texto");
t->show();
return app.exec();
}
Exemplos de Widget: QTextEdit

