Child QWidget绘制不正确

时间:2012-09-06 12:38:48

标签: qwidget qwebview qt4.8

当用户在网页中选择输入文本字段时,我需要显示虚拟键盘。此代码在机顶盒上运行。

我正在扩展QWebView,它正在创建一个新的键盘小部件作为孩子。

WebView::WebView(QWidget* parent = 0): QWebView(parent)
{
    WebPage *page = new WebPage(this);
    this->m_keyboard = new widgetKeyBoard(this, Qt::Window|Qt::CustomizeWindowHint);
    this->m_keyboard->createKeyboard();
    this->m_keyboard->hide();
    connect(this, SIGNAL(launchVirtualKB(WebView *) ), SLOT(launchKeyboard(WebView *)));
}

widgetKeyBoard由QGridLayout和许多子QKeyPushButton组成。

当我进行键盘演示时,我看到整个键盘被短暂绘制,然后从下面的网页覆盖了30%的键盘(在输入字段附近覆盖)。我试图对webview和mainwindow进行自己的重绘,但仍然看到其他人正在覆盖。

可能导致此类问题的原因。我使用的是QT4.8。

0 个答案:

没有答案
相关问题