Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //learn00.pro
- //***********
- #-------------------------------------------------
- #
- # Project created by QtCreator 2010-11-13T00:49:24
- #
- #-------------------------------------------------
- QT += webkit
- TARGET = sans_titre3
- CONFIG += meegotouch
- TEMPLATE = app
- target.path=/usr/local/bin
- INSTALLS=target
- SOURCES += main.cpp \
- MaPage.cpp
- HEADERS += \
- MaPage.h
- //***********
- // MaPage.cpp
- //***********
- #include <QtWebKit>
- #include <MApplication>
- #include <MButton>
- #include <MApplication>
- #include <MApplicationWindow>
- #include <MaPage.h>
- MaPage::MaPage() : QWidget()
- {
- MApplicationWindow w;
- MApplicationPage p;
- MButton *pushButton = new MButton("Key Button", this);
- p->setCentralWidget(pushButton);
- QObject::connect(pushButton, SIGNAL(valueChanged(int)), this, SLOT(monSlot()));
- }
- void MaPage::monSlot()
- {
- QWebView *pageWeb = new QWebView;
- pageWeb->load(QUrl("http://hd1.freebox.fr/pub/remote_control?code=4837013&key=power"));
- }
- //***********
- // MaPage.h
- //************
- #ifndef MAPAGE_H
- #define MAPAGE_H
- #include <QApplication>
- #include <QWidget>
- #include <MApplication>
- #include <MButton>
- #include <QtWebKit>
- class MaPage : public QWidget
- {
- Q_OBJECT
- public:
- MaPage();
- public slots:
- void monSlot();
- private:
- MButton *m_bouton;
- QWebView *pageWeb;
- };
- #endif // MAPAGE_H
- //*********
- // main.cpp
- //**********
- #include <MApplication>
- #include <MApplicationWindow>
- #include <MApplicationPage>
- #include <MLabel>
- #include <MButton>
- #include <QtWebKit>
- #include <MaPage.h>
- int main(int argc, char *argv[])
- {
- MApplication a(argc, argv);
- //MApplicationWindow w;
- // MApplicationPage p;
- MaPage mapage;
- mapage.show();
- //w.show();
- //p.appear();
- return a.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement