this->backbone = backbone;
-
#ifdef Q_WS_MAEMO_5
setAttribute(Qt::WA_Maemo5StackedWindow);
#endif
initializeUI();
- /* connect(textEdit, SIGNAL(customContextMenuRequested(QPoint)),
- this, SLOT(showContextMenu(QPoint)));*/
+ connect(backbone, SIGNAL(htmlReady()),
+ this, SLOT(show()));
setWindowTitle(tr("Translation"));
}
-
void TranslationWidget::show() {
QScrollArea::show();
textEdit->setPlainText(trans);
- textEdit->update(this->rect());
+ textEdit->repaint(this->rect());
+
+ update(this->rect());
+
}
void TranslationWidget::initializeUI() {
- /*contextMenu = new QMenu;
-
- contextMenu->addAction(tr("Copy"), this, SLOT(copy()));
- contextMenu->addAction(tr("Paste"), this, SLOT(paste()));
- contextMenu->addAction(tr("Select all"), this, SLOT(selectAll()));*/
textEdit = new QTextEdit;
textEdit->setReadOnly(true);
this->setWidget(w);
this->setWidgetResizable(true);
-
}
void TranslationWidget::showContextMenu(QPoint pos) {