~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to demos/gradients/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "gradients.h"
 
2
 
 
3
#include <qapplication.h>
 
4
 
 
5
int main(int argc, char **argv)
 
6
{
 
7
    Q_INIT_RESOURCE(gradients);
 
8
 
 
9
    QApplication app(argc, argv);
 
10
 
 
11
    GradientWidget gradientWidget(0);
 
12
    QStyle *arthurStyle = new ArthurStyle();
 
13
    gradientWidget.setStyle(arthurStyle);
 
14
    QList<QWidget *> widgets = qFindChildren<QWidget *>(&gradientWidget);
 
15
    foreach (QWidget *w, widgets)
 
16
        w->setStyle(arthurStyle);
 
17
    gradientWidget.show();
 
18
 
 
19
    return app.exec();
 
20
}