Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QXcbConnection: XCB error: 8 (BadMatch),
Forum Updated to NodeBB v4.3 + New Features

QXcbConnection: XCB error: 8 (BadMatch),

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 2 Posters 16.5k Views 1 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #9

    Check whether you have any path that might be relative in your code.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • gfxxG Offline
      gfxxG Offline
      gfxx
      wrote on last edited by
      #10

      Strange these error .... Finally I found these ....

      As I said the problem is a Qdialog ... these dialog is only a Waiting charge dialog with a circular progress bar .... first of insert my openCvWidget the code to start it was:

      m_dia2 = new Dia2(this);
                  m_dia2->setAttribute(Qt::WA_DeleteOnClose, true);
                  m_dia2->setWindowFlags(Qt::Widget | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
                  m_dia2->setAttribute(Qt::WA_NoSystemBackground, true);
                  m_dia2->setAttribute(Qt::WA_TranslucentBackground, true);
                  m_dia2->AutoBmecdia2Value(AutoCount);
                  m_dia2->Stepbmecdia2Value(WaitingStep);
                  m_dia2->show();
      

      but now with "this" flag I Obtain QXcbConnection:XCB error 8 ......
      for solve the error now the code is:

      m_dia2 = new Dia2();
                  m_dia2->setAttribute(Qt::WA_DeleteOnClose, true);
                  m_dia2->setWindowFlags(Qt::Widget | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
                  m_dia2->setAttribute(Qt::WA_NoSystemBackground, true);
                  m_dia2->setAttribute(Qt::WA_TranslucentBackground, true);
                  m_dia2->AutoBmecdia2Value(AutoCount);
                  m_dia2->Stepbmecdia2Value(WaitingStep);
                  m_dia2->show();
      

      in these way the dialog can exist when myapp is close and not found other solution to close these dialog when my app close .... Why firt to add a new code I can use:

      m_dia2 = new Dia2(this);
      

      and after only:

      m_dia2 = new Dia2();
      

      ???

      regards
      Giorgio

      bkt

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #11

        From what widget are you calling this code ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • gfxxG Offline
          gfxxG Offline
          gfxx
          wrote on last edited by
          #12

          from void in MainWindow .....

          regards
          Giorgio

          bkt

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #13

            void is a type, do you mean in a slot from MainWindow ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • gfxxG Offline
              gfxxG Offline
              gfxx
              wrote on last edited by
              #14

              I call it in c++ style some time from mainwindow slot sometime from qthread with connect signal slot but nevertimre directly every time calling it inside a mainwindows slot....

              regards
              giorgio

              bkt

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #15

                How did you connect the signal from that QThread ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • gfxxG Offline
                  gfxxG Offline
                  gfxx
                  wrote on last edited by
                  #16

                  i have a slot in mainwindow that start qhread ... inside that slot I have a list of:

                  connect(mythread, SIGNAL(mysignal1(Qimage)), this, SLOT(mainwindosslot(QImage)), Qt::DirectConnection);
                  

                  for example....

                  Ragards
                  Giorgio

                  bkt

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #17

                    Why are you forcing a direct connection ?

                    This means that the slot will be called in the context of the thread managed by QThread which is not the GUI thread thus you are doing GUI related stuff from another thread which is not allowed.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1
                    • gfxxG Offline
                      gfxxG Offline
                      gfxx
                      wrote on last edited by
                      #18

                      @SGaist ... you are in right .... tanks.

                      regards
                      miki

                      bkt

                      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