[Solved]Unable to listen to port
-
I created a pointer to a QQuickView, but when i try to debug it, it displays me this error(translated):
Could not create a connection to the Debug-component in the process. The port is already in use.Code
@QQuickView *view = new QQuickView();
QWidget *container = QWidget::createWindowContainer(view, this);@Applicationoutput:
QDeclarativeDebugServer: Waiting for connection on port 52294...
QDeclarativeDebugServer: Connection established
QML Debugger: Unable to listen to port 52294.Any way to solve this problem?
-
are you running this with Qt creator ? Are you running another program already in QtCreator ?
-
Yes i am running it with QtCreater and no, i am not running another program in QtCreator. The problem would be probably that i've got a QMainWindow and i am trying to create a WindowedContainer with a QQuickView as it's view and the QMainWindow as it's parent? Is there any way to still make it work or is there another way to use a QtQuick 2.0 application inside a QMainWindow?
@MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);QQuickView *view = new QQuickView(); view->setSource(QUrl("testqml.qml")); QWidget *container = QWidget::createWindowContainer(view, this); container->show();
}@
-
I don't see a issue. Mainwindow is ok as it also a QWidget. Some other process is occupying the port used by our debugger. As wild guess, restart you QtCreator and also system once. This will surely free-up the port.
-
ooops. You should not have both. May complete posting of the code would helped. It is good that is solved now. Happy ending. Enjoy