×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Exemplos de QWidgets

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Fix version categories)
hamishwillee (Talk | contribs)
m (Text replace - "Category:MeeGo" to "Category:MeeGo Harmattan")
Line 1: Line 1:
[[Category:Lang-Portuguese]][[Category:Qt C++ UI]][[Category:Code Snippet]][[Category:MeeGo]][[Category:Symbian]][[Category:S60 3rd Edition]][[Category:S60 3rd Edition FP1]][[Category:S60 3rd Edition FP2]]
+
[[Category:Lang-Portuguese]][[Category:Qt C++ UI]][[Category:Code Snippet]][[Category:MeeGo Harmattan]][[Category:Symbian]][[Category:S60 3rd Edition]][[Category:S60 3rd Edition FP1]][[Category:S60 3rd Edition FP2]]
 
{{Abstract|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}}
 
{{Abstract|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}}
 
{{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.}}
 
{{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.}}

Revision as of 13:52, 13 June 2012

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

Archived.pngAquivado: 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.

Article Metadata

Testado com
Aparelho(s): N95-1

Compatibilidade
Artigo
Palavras-chave: QTextEdit, QSpinBox, QSlider, QPushButton
Criado por cabezonxdg em 25 Aug 2009
Última alteração feita por hamishwillee em 13 Jun 2012

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();
}
SliderQt.PNG
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();
}
BotaoQt.PNG
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();
}
CampoTextoQt.PNG
Exemplos de Widget: QTextEdit
121 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×