januszmk
19th July 2012, 13:43
Hi.
I have class inherited from QThread. I am using QWebPage in there, for my developers purpose, I getting QWebPage from QWebView, but when I am calling function QWebView::show(), my program is terminated with error:
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
N: /var/tmp/portage/x11-libs/libX11-1.5.0/work/libX11-1.5.0/src/xcb_io.c:178: dequeue_pending_request: Warunek zapewnienia `!xcb_xlib_unknown_req_in_deq' nie został spełniony.
The program has unexpectedly finished.
My header file:
...
#include <QThread>
#include <QtWebKit>
class myclass : public QThread
{
....
Q_OBJECT
public:
explicit myclass();
...
protected:
Logger *logger;
QEventLoop loop;
Settings *mySettings;
public slots:
void pageLoading() { loop.exec(); }
}
source file:
myclass::myclass()
{
logger = Logger::getInstance();
mySettings = Settings::getInstance();
QWebView *view = new QWebView();
logger->Info("Showing QWebView");
view->show();
myPage = view->page();
connect(myPage->networkAccessManager(), SIGNAL(finished(QNetworkReply*)), &loop, SLOT(quit()));
connect(myPage,SIGNAL(loadStarted()), this, SLOT(pageLoading()));
}
I deleted line with view->show(); and my program is working fine.
My class has type of abstract. I inherit her in dynamic library. Am I doing something wrong, or it's problem with libX11?
I have class inherited from QThread. I am using QWebPage in there, for my developers purpose, I getting QWebPage from QWebView, but when I am calling function QWebView::show(), my program is terminated with error:
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
N: /var/tmp/portage/x11-libs/libX11-1.5.0/work/libX11-1.5.0/src/xcb_io.c:178: dequeue_pending_request: Warunek zapewnienia `!xcb_xlib_unknown_req_in_deq' nie został spełniony.
The program has unexpectedly finished.
My header file:
...
#include <QThread>
#include <QtWebKit>
class myclass : public QThread
{
....
Q_OBJECT
public:
explicit myclass();
...
protected:
Logger *logger;
QEventLoop loop;
Settings *mySettings;
public slots:
void pageLoading() { loop.exec(); }
}
source file:
myclass::myclass()
{
logger = Logger::getInstance();
mySettings = Settings::getInstance();
QWebView *view = new QWebView();
logger->Info("Showing QWebView");
view->show();
myPage = view->page();
connect(myPage->networkAccessManager(), SIGNAL(finished(QNetworkReply*)), &loop, SLOT(quit()));
connect(myPage,SIGNAL(loadStarted()), this, SLOT(pageLoading()));
}
I deleted line with view->show(); and my program is working fine.
My class has type of abstract. I inherit her in dynamic library. Am I doing something wrong, or it's problem with libX11?