Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Solved]Unable to listen to port
QtWS25 Last Chance

[Solved]Unable to listen to port

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 2 Posters 5.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    onek24
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      are you running this with Qt creator ? Are you running another program already in QtCreator ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • O Offline
        O Offline
        onek24
        wrote on last edited by
        #3

        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();
        

        }@

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          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.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • O Offline
            O Offline
            onek24
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Qt Champions 2022
              wrote on last edited by
              #6

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

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved