auto reparent in main window; refs #167
This commit is contained in:
@@ -692,4 +692,13 @@ Specify full path to executable program</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::SwissWebWidget</name>
|
||||
<message>
|
||||
<location filename="swisswebwidget.hxx" line="37"/>
|
||||
<source>Browser Tools</source>
|
||||
<comment>name of the browser's toolbar</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@@ -692,4 +692,13 @@ Specify full path to executable program</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::SwissWebWidget</name>
|
||||
<message>
|
||||
<location filename="swisswebwidget.hxx" line="37"/>
|
||||
<source>Browser Tools</source>
|
||||
<comment>name of the browser's toolbar</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@@ -692,4 +692,13 @@ Specify full path to executable program</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::SwissWebWidget</name>
|
||||
<message>
|
||||
<location filename="swisswebwidget.hxx" line="37"/>
|
||||
<source>Browser Tools</source>
|
||||
<comment>name of the browser's toolbar</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@@ -692,4 +692,13 @@ Specify full path to executable program</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::SwissWebWidget</name>
|
||||
<message>
|
||||
<location filename="swisswebwidget.hxx" line="37"/>
|
||||
<source>Browser Tools</source>
|
||||
<comment>name of the browser's toolbar</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#include <qbrowserlib/ui_swisswebwidget.h>
|
||||
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QToolBar>
|
||||
#include <QtGui/QStatusBar>
|
||||
|
||||
//! @addtogroup qbrowserlib
|
||||
//! @{
|
||||
@@ -27,6 +29,18 @@ namespace qbrowserlib {
|
||||
public:
|
||||
SwissWebWidget(QWidget* p=0): QWidget(p) {
|
||||
setupUi(this);
|
||||
QMainWindow* w(qobject_cast<QMainWindow*>(p));
|
||||
if (w) {
|
||||
/*! Within a QMainWindow, the widget automatically reparents
|
||||
the top buttons to the toolbar and the bottom status
|
||||
line to the window's status bar. */
|
||||
QToolBar* t(w->addToolBar(trUtf8("Browser Tools",
|
||||
"name of the browser's toolbar")));
|
||||
_tools->setParent(t);
|
||||
_statusbar->removeWidget(_status);
|
||||
for (int i(_statusbar->count()); i>0;)
|
||||
w->statusBar()->addWidget(_statusbar->itemAt(--i)->widget());
|
||||
}
|
||||
}
|
||||
protected:
|
||||
};
|
||||
|
@@ -116,7 +116,7 @@
|
||||
<widget class="qbrowserlib::SwissWebView" name="swisswebview"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_stats">
|
||||
<layout class="QHBoxLayout" name="_statusbar">
|
||||
<item>
|
||||
<widget class="QLabel" name="_status">
|
||||
<property name="sizePolicy">
|
||||
|
Reference in New Issue
Block a user