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),

QXcbConnection: XCB error: 8 (BadMatch),

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 2 Posters 16.8k 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.
  • gfxxG Offline
    gfxxG Offline
    gfxx
    wrote on last edited by gfxx
    #5

    the mechanism:

    1-qthread with opencv grab from camera...+ v4l.cpp integrted in it for right converting of image....(opencv meke some logical operation on image matrix)
    2-matrix2Qimage functon
    3-Qimage send to glwidg that use paint event to refresh QImage and convertitin the right dimension (i these way you can use opengl too and you can send multiple image if you wont...)
    4-in gui qlabel show qimqge or multiple tranformation from opengl if you want.....

    I show glwidg because opencv part use noting of qt part.... only matrix2qimage funcon...... glwidg use painter event ....other part of gui is right tested without glwidg....

    Thnks for your help

    Regards Giorgio

    bkt

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

      Do you mean that you show the image twice ? Once with a QLabel and once with your QGLWidget ?

      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 gfxx
        #7

        Real Real Sorry.... no QLabel exist..... GLwidg and opencv calculation is my old application vision system... now I rewamp it in my new interface ... to do that I have copy and paste .ui an .h .cpp file .... I see now that not exist QLabel that now is my custom widget GLwidg.....

        I must correct these:

        the mechanism:

        1-qthread with opencv grab from camera...+ v4l.cpp integrted in it for right converting of image....(opencv meke some logical operation on image matrix)
        2-matrix2Qimage functon
        3-Qimage send to glwidg that use paint event to refresh QImage and convertitin the right dimension (i these way you can use opengl too and you can send multiple image if you wont...) and show image in gui [stop here]
        /// not exist ///4-in gui qlabel show qimqge or multiple tranformation from opengl if you want...../

        Any how .....the error is still before the thread that creates the images begin to convey to glwidgt few frames .... I have a button to activate or not the Qthread with opencv capture .... The error occurs just start my application ... reading the link you gave me the error appears to be related to a window that does not open .... I put in /.../ all the code that launches messages or popup windows .... but XBC error remains .....

        Please can someone explain to me what does QXcb ??

        Regards
        Giorgio

        bkt

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

          ok I understand how not works ..... my app is quite large and not can control all in any situation ....

          fortunately today I needed to launch a command from my interface .... I made a mistake and the machinery driven by the interface has returned an error to me properly .... just that the pop-up window notifying the error is not seen .. ... so I could verify that the notification window is broken somewhere ...but to some resources it is not available (it could be a font, an icon, an associated variable ... I do not know .... )

          mystery solved ... almost ... now I have to see what that is hidden to the system.

          regards
          Giorgio

          bkt

          1 Reply Last reply
          0
          • 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