Important: Please read the Qt Code of Conduct -

[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.

    @QQuickView *view = new QQuickView();
    QWidget *container = QWidget::createWindowContainer(view, this);@


    QDeclarativeDebugServer: Waiting for connection on port 52294...
    QDeclarativeDebugServer: Connection established
    QML Debugger: Unable to listen to port 52294.

    Any way to solve this problem?

  • Qt Champions 2017

    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) :
    ui(new Ui::MainWindow)

    QQuickView *view = new QQuickView();
    QWidget *container = QWidget::createWindowContainer(view, this);


  • Qt Champions 2017

    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.

  • Alright, probably my bad because i've just detected a QDeclarativeView in my Gui which shouldn't be there. It is impossible to have a DeclarativeView and a QuickView, isn't it? Well, thanks for your help.

  • Qt Champions 2017

    ooops. You should not have both. May complete posting of the code would helped. It is good that is solved now. Happy ending. Enjoy

Log in to reply