在線程中new對象時添加this提示:
Cannot create children for a parent that is in a different thread.
去掉this就好了
void SocketThread::run()
{
qDebug() << "線程1:" << QThread::currentThread();
QTcpSocket *m_socket = new QTcpSocket(this);//錯誤
}
在線程中new對象時添加this提示:
Cannot create children for a parent that is in a different thread.
去掉this就好了
void SocketThread::run()
{
qDebug() << "線程1:" << QThread::currentThread();
QTcpSocket *m_socket = new QTcpSocket(this);//錯誤
}
在X11上,Qt支持Xcursor庫,可以隨意更改全綵色的Cursor主題。但是在嵌入式Qt開發中,沒有Xcursor的支持,效果就沒這麼樂觀。