-rw-r--r-- | libopie2/opieui/otabwidget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp index d617a9c..7103884 100644 --- a/libopie2/opieui/otabwidget.cpp +++ b/libopie2/opieui/otabwidget.cpp | |||
@@ -118,12 +118,15 @@ void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &lab | |||
118 | m_widgetStack->setFrameStyle( QFrame::StyledPanel | QFrame::Raised ); | 118 | m_widgetStack->setFrameStyle( QFrame::StyledPanel | QFrame::Raised ); |
119 | 119 | ||
120 | // Keep track of tab information | 120 | // Keep track of tab information |
121 | OTabInfo *tabinfo = new OTabInfo( tabid, child, icon, label ); | 121 | OTabInfo *tabinfo = new OTabInfo( tabid, child, icon, label ); |
122 | m_tabs.append( tabinfo ); | 122 | m_tabs.append( tabinfo ); |
123 | 123 | ||
124 | // Force resizing of child controls | ||
125 | resizeEvent( 0x0 ); | ||
126 | |||
124 | // Make newly added tab the current one displayed | 127 | // Make newly added tab the current one displayed |
125 | selectTab( tabinfo ); | 128 | selectTab( tabinfo ); |
126 | } | 129 | } |
127 | 130 | ||
128 | void OTabWidget::removePage( QWidget *childwidget ) | 131 | void OTabWidget::removePage( QWidget *childwidget ) |
129 | { | 132 | { |
@@ -164,12 +167,15 @@ void OTabWidget::removePage( QWidget *childwidget ) | |||
164 | if ( !m_currTab ) | 167 | if ( !m_currTab ) |
165 | m_widgetStack->setFrameStyle( QFrame::NoFrame ); | 168 | m_widgetStack->setFrameStyle( QFrame::NoFrame ); |
166 | 169 | ||
167 | // Redraw widget | 170 | // Redraw widget |
168 | setUpLayout(); | 171 | setUpLayout(); |
169 | } | 172 | } |
173 | |||
174 | // Force resizing of child controls | ||
175 | resizeEvent( 0x0 ); | ||
170 | } | 176 | } |
171 | } | 177 | } |
172 | 178 | ||
173 | void OTabWidget::changeTab( QWidget *widget, const QString &iconset, const QString &label) | 179 | void OTabWidget::changeTab( QWidget *widget, const QString &iconset, const QString &label) |
174 | { | 180 | { |
175 | // Find tab information for desired widget | 181 | // Find tab information for desired widget |
@@ -205,12 +211,15 @@ void OTabWidget::changeTab( QWidget *widget, const QString &iconset, const QStri | |||
205 | } | 211 | } |
206 | 212 | ||
207 | // Update tab information | 213 | // Update tab information |
208 | currtab->setLabel( label ); | 214 | currtab->setLabel( label ); |
209 | currtab->setIcon( iconset ); | 215 | currtab->setIcon( iconset ); |
210 | 216 | ||
217 | // Force resizing of child controls | ||
218 | resizeEvent( 0x0 ); | ||
219 | |||
211 | // Redraw widget | 220 | // Redraw widget |
212 | setUpLayout(); | 221 | setUpLayout(); |
213 | } | 222 | } |
214 | } | 223 | } |
215 | 224 | ||
216 | void OTabWidget::setCurrentTab( QWidget *childwidget ) | 225 | void OTabWidget::setCurrentTab( QWidget *childwidget ) |