diff options
-rw-r--r-- | examples/activeqt/webbrowser/main.cpp | 7 | ||||
-rw-r--r-- | examples/activeqt/webbrowser/mainwindow.ui | 21 | ||||
-rw-r--r-- | examples/activeqt/webbrowser/mainwindow_windowsmobile.ui | 21 |
3 files changed, 7 insertions, 42 deletions
diff --git a/examples/activeqt/webbrowser/main.cpp b/examples/activeqt/webbrowser/main.cpp index 51a9dce..e65526d 100644 --- a/examples/activeqt/webbrowser/main.cpp +++ b/examples/activeqt/webbrowser/main.cpp @@ -41,6 +41,8 @@ #include <QApplication> #include <QMessageBox> #include <QProgressBar> +#include <QLineEdit> +#include <QLabel> #include <QStatusBar> #include <QMainWindow> #include <QAbstractEventDispatcher> @@ -74,6 +76,7 @@ public slots: private: QProgressBar *pb; + QLineEdit *addressEdit; }; //! [0] //! [1] @@ -81,6 +84,10 @@ MainWindow::MainWindow() { setupUi(this); + addressEdit = new QLineEdit; + tbAddress->insertWidget(actionGo, new QLabel(tr("Address"))); + tbAddress->insertWidget(actionGo, addressEdit); + connect(addressEdit, SIGNAL(returnPressed()), actionGo, SLOT(trigger())); connect(actionBack, SIGNAL(triggered()), WebBrowser, SLOT(GoBack())); connect(actionForward, SIGNAL(triggered()), WebBrowser, SLOT(GoForward())); diff --git a/examples/activeqt/webbrowser/mainwindow.ui b/examples/activeqt/webbrowser/mainwindow.ui index 12a0a32..9af0f8e 100644 --- a/examples/activeqt/webbrowser/mainwindow.ui +++ b/examples/activeqt/webbrowser/mainwindow.ui @@ -87,19 +87,6 @@ <property name="windowTitle" > <string>Address</string> </property> - <widget class="QLabel" name="lblAddress" > - <property name="objectName" > - <string notr="true" >lblAddress</string> - </property> - <property name="text" > - <string>Address</string> - </property> - </widget> - <widget class="QLineEdit" name="addressEdit" > - <property name="objectName" > - <string notr="true" >addressEdit</string> - </property> - </widget> <addaction name="actionGo" /> </widget> <widget class="QMenuBar" name="menubar" > @@ -271,14 +258,6 @@ <header>webaxwidget.h</header> </customwidget> </customwidgets> - <connections> - <connection> - <sender>addressEdit</sender> - <signal>returnPressed()</signal> - <receiver>actionGo</receiver> - <slot>trigger()</slot> - </connection> - </connections> <layoutdefault spacing="6" margin="11" /> <images> <image name="image0" > diff --git a/examples/activeqt/webbrowser/mainwindow_windowsmobile.ui b/examples/activeqt/webbrowser/mainwindow_windowsmobile.ui index 98a9ddb..768dc43 100644 --- a/examples/activeqt/webbrowser/mainwindow_windowsmobile.ui +++ b/examples/activeqt/webbrowser/mainwindow_windowsmobile.ui @@ -87,19 +87,6 @@ <property name="windowTitle" > <string>Address</string> </property> - <widget class="QLabel" name="lblAddress" > - <property name="objectName" > - <string notr="true" >lblAddress</string> - </property> - <property name="text" > - <string>Address</string> - </property> - </widget> - <widget class="QLineEdit" name="addressEdit" > - <property name="objectName" > - <string notr="true" >addressEdit</string> - </property> - </widget> <addaction name="actionGo" /> </widget> <widget class="QMenuBar" name="menubar" > @@ -264,14 +251,6 @@ </property> </actiongroup> </widget> - <connections> - <connection> - <sender>addressEdit</sender> - <signal>returnPressed()</signal> - <receiver>actionGo</receiver> - <slot>trigger()</slot> - </connection> - </connections> <layoutdefault spacing="6" margin="11" /> <images> <image name="image0" > |