Home > Back-end >  QCefView initialization error
QCefView initialization error

Time:12-11

QCefView, borrowed from the making of a test example, the UI replaced QWidget, runtime QCefView initialization error, trouble which bosses look

 QCefViewTest: : QCefViewTest (QWidget * parent) 
: QMainWindow (parent)
{
M_widget=new QWidget.
QHBoxLayout * layout=new QHBoxLayout (this);
QPushButton * pBtnChangeColor=new QPushButton (" Change Color ", this);
The connect (pBtnChangeColor, SIGNAL (clicked ()), and this, SLOT (onBtnChangeColorClicked ()));
Layout - & gt; AddWidget (pBtnChangeColor);

QDir dir=QCoreApplication: : applicationDirPath ();
QString uri=QDir: : toNativeSeparators (dir. FilePath (" QCefViewTestPage. HTML "));
M_cefView=new QCefView (uri, m_widget);
Layout - & gt; AddWidget (m_cefView);

M_widget - & gt; SetLayout (layout);
This - & gt; SetCentralWidget (m_widget);
}

  • Related