Advertisement
Guest User

Untitled

a guest
Nov 18th, 2010
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. //learn00.pro
  2. //***********
  3. #-------------------------------------------------
  4. #
  5. # Project created by QtCreator 2010-11-13T00:49:24
  6. #
  7. #-------------------------------------------------
  8. QT += webkit
  9. TARGET = sans_titre3
  10. CONFIG += meegotouch
  11. TEMPLATE = app
  12. target.path=/usr/local/bin
  13. INSTALLS=target
  14.  
  15. SOURCES += main.cpp \
  16. MaPage.cpp
  17.  
  18. HEADERS += \
  19. MaPage.h
  20.  
  21. //***********
  22. // MaPage.cpp
  23. //***********
  24. #include <QtWebKit>
  25. #include <MApplication>
  26. #include <MButton>
  27. #include <MApplication>
  28. #include <MApplicationWindow>
  29. #include <MaPage.h>
  30.  
  31. MaPage::MaPage() : QWidget()
  32. {
  33. MApplicationWindow w;
  34. MApplicationPage p;
  35. MButton *pushButton = new MButton("Key Button", this);
  36. p->setCentralWidget(pushButton);
  37. QObject::connect(pushButton, SIGNAL(valueChanged(int)), this, SLOT(monSlot()));
  38. }
  39.  
  40.  
  41. void MaPage::monSlot()
  42. {
  43. QWebView *pageWeb = new QWebView;
  44. pageWeb->load(QUrl("http://hd1.freebox.fr/pub/remote_control?code=4837013&key=power"));
  45. }
  46.  
  47. //***********
  48. // MaPage.h
  49. //************
  50. #ifndef MAPAGE_H
  51. #define MAPAGE_H
  52.  
  53. #include <QApplication>
  54. #include <QWidget>
  55. #include <MApplication>
  56. #include <MButton>
  57. #include <QtWebKit>
  58.  
  59. class MaPage : public QWidget
  60. {
  61. Q_OBJECT
  62.  
  63. public:
  64. MaPage();
  65.  
  66. public slots:
  67. void monSlot();
  68.  
  69. private:
  70. MButton *m_bouton;
  71. QWebView *pageWeb;
  72. };
  73.  
  74. #endif // MAPAGE_H
  75.  
  76. //*********
  77. // main.cpp
  78. //**********
  79. #include <MApplication>
  80. #include <MApplicationWindow>
  81. #include <MApplicationPage>
  82. #include <MLabel>
  83. #include <MButton>
  84. #include <QtWebKit>
  85. #include <MaPage.h>
  86.  
  87. int main(int argc, char *argv[])
  88. {
  89. MApplication a(argc, argv);
  90.  
  91. //MApplicationWindow w;
  92. // MApplicationPage p;
  93.  
  94. MaPage mapage;
  95. mapage.show();
  96.  
  97. //w.show();
  98. //p.appear();
  99.  
  100. return a.exec();
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement