Skip to content

3rd Party Software

Combining Qt with 3rd party libraries or components? Ask here!
1.1k Topics 5.6k Posts
Qt 6.11 is out! See what's new in the release blog
  • Issue while generating Digital Membership Card in Qt application

    Unsolved
    2
    0 Votes
    2 Posts
    39 Views
    SGaistS
    Hi and welcome to devnet, How are you generating the images ? Where are they stored ? At which resolution ? How many calls are you making for that ?
  • Facing UI & Performance Issues in Digital Membership Card Software Built with Qt

    Unsolved
    2
    0 Votes
    2 Posts
    173 Views
    GrecKoG
    /edit by moderator: removed spam link Should have removed the whole post, those are most likely not actual problems occuring to OP, too vague and generic.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • QwtKnob with custom scale

    Unsolved
    1
    0 Votes
    1 Posts
    500 Views
    No one has replied
  • QwtKnob

    Solved
    3
    0 Votes
    3 Posts
    616 Views
    B
    Yes I see now that QwtKnob inherits from QwtAbstractSlider, which provides the signal sliderPressed. It works! Qwt is really good.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Improve rendering performance while integrating libmpv with QtQuick (+Python)

    Solved
    2
    1 Votes
    2 Posts
    2k Views
    T
    I've implemented offscreen rendering in our app. Implementation details are in the corresponding PR. Best
  • Qwt versions

    Solved
    4
    1 Votes
    4 Posts
    1k Views
    JonBJ
    @Buller You are aware that both of these are compile-time macros (e.g. https://qwt.sourceforge.io/qwt__global_8h_source.html) so, assuming you put these in your source code, they do not necessarily tell you anything about the "runtime versions" that the libraries might have been compiled with in the past? Or the runtime version of either Qt or QWT which might happen to be found?
  • Qwt trying to draw symbol even it is null

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    P
    So finally an update ! In my code I used 'setStyle' which modifes obviously internals of the QwtCurve in my "class CustomQwtCurve : public QObject, public QwtPlotCurve" constructor I had: setStyle(QwtPlotCurve::Lines); this seems to do stuff that makes it break. I added : setSymbol(nullptr); to the end of constructor and now it does not crash anymore. It also does not crash if I remove setStyle(QwtPlotCurve::Lines);
  • [QXmpp] Trying to use sendMessage to a MUC crashes my app.

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    S
    Thank you everyone for taking your time to reply me. The mistake was that, the invokation of the functions were in different qml files, and I had used different instances of the class in the 2 files. I finally fixed it :)
  • [SOLVED]QXmpp creating a MUC room (xep--0045) on the server

    qxmpp
    6
    0 Votes
    6 Posts
    3k Views
    SGaistS
    @SrisharanVS hi, Since it's a git repository, did you clone it and check the commit history ?
  • Can I use OpenCV YOLO to detect my own objects?

    Unsolved
    6
    0 Votes
    6 Posts
    3k Views
    B
    I completed the code by adding a couple of new functions, taking into account the output of images from the camera and video, and also added logs and improved the display of the detected object self.busy = False self.moves_enabled = False self.cls2cat = { "adjustable_wrench": "Box1", "gear": "Box2", "hammer": "Box3", "screwdriver": "Брак" } self.BtCamera.clicked.connect(self.Camera) self.BtVideo.clicked.connect(self.Video) self.BtDetectObject.clicked.connect(self.toggle_objects) self.BtDetectPeople.clicked.connect(self.toggle_people) self.BtMoveObjects.clicked.connect(self.toggle_moves) self.yolo = YOLO('best.pt') self.cap = None self.videoActive = False self.cameraActive = False self.det_objects = False self.det_was_active = False self.people_present = False self._seen, self._ttl = {}, 2000 self.frame_timer = QtCore.QTimer(self) self.frame_timer.timeout.connect(self.tick) self.people_timer = QtCore.QTimer(self) self.people_timer.timeout.connect(self.tick_people) def Camera(self): if not self.cameraActive: if self.cap: try: self.cap.release() except: pass self.cap = cv2.VideoCapture(0) if not self.cap.isOpened(): self.add_log('Камера: не удалось открыть 0'); return self.videoActive, self.cameraActive = False, True if not self.frame_timer.isActive(): self.frame_timer.start(33) self.add_log('Камера: старт') else: if self.frame_timer.isActive(): self.frame_timer.stop() if self.cap: try: self.cap.release() except: pass self.cap = None self.videoActive = self.cameraActive = False if hasattr(self, 'LCamera1'): self.LCamera1.clear() if hasattr(self, 'LCamera2'): self.LCamera2.clear() self.add_log('Камера: стоп') def Video(self): if not self.videoActive: src = 'Video2.mp4' if self.cap: try: self.cap.release() except: pass self.cap = cv2.VideoCapture(src) if not self.cap.isOpened(): self.add_log(f'Видео: не удалось открыть {src}'); return self.videoActive, self.cameraActive = True, False if not self.frame_timer.isActive(): self.frame_timer.start(33) self.add_log(f'Видео: старт {src}') else: if self.frame_timer.isActive(): self.frame_timer.stop() if self.cap: try: self.cap.release() except: pass self.cap = None self.videoActive = self.cameraActive = False if hasattr(self, 'LCamera1'): self.LCamera1.clear() if hasattr(self, 'LCamera2'): self.LCamera2.clear() self.add_log('Видео: стоп') def toggle_objects(self): self.det_objects = not self.det_objects if hasattr(self, 'BtDetectObject'): self.BtDetectObject.setText("Stop detection" if self.det_objects else "Detect objects") self.add_log("Детекция объектов: ON" if self.det_objects else "Детекция объектов: OFF") def toggle_people(self): if self.people_timer.isActive(): self.people_timer.stop() self.add_log('Мониторинг человека: OFF') else: self.people_timer.start(200) self.add_log('Мониторинг человека: ON') def _dedup(self, name, cx, cy): k, now = (name, cx//10, cy//10), int(time.time()*1000) if now - self._seen.get(k, 0) < self._ttl: return False self._seen[k] = now; return True def _ok(self, name: str) -> bool: name = name.lower() mapping = { 'adjustable_wrench': getattr(self, 'CBBox1', None), 'gear': getattr(self, 'CBBox2', None), 'hammer': getattr(self, 'CBBox3', None), 'screwdriver': getattr(self, 'CBReject', None) } w = mapping.get(name) return bool(w and w.isChecked()) def _to_label(self, label: QtWidgets.QLabel, bgr): if label is None: return rgb = cv2.cvtColor(bgr, cv2.COLOR_BGR2RGB) h, w, c = rgb.shape qimg = QtGui.QImage(rgb.data, w, h, w * c, QtGui.QImage.Format_RGB888) label.setPixmap(QtGui.QPixmap.fromImage(qimg).scaled(label.width(), label.height(), QtCore.Qt.KeepAspectRatio)) def tick_people(self): try: if self.smart_camera.getPerson(): self.lamp.setLamp('0001') if self.det_objects: self.det_was_active = True self.det_objects = False if self.frame_timer.isActive(): self.frame_timer.stop() if not self.people_present: self.people_present = True self.add_log('Человек в рабочей зоне! Детекция остановлена') else: self.lamp.setLamp('1000') if self.people_present: self.people_present = False self.add_log('Зона свободна') if not self.frame_timer.isActive() and (self.videoActive or self.cameraActive) and self.cap: self.frame_timer.start(33) if self.det_was_active and not self.det_objects: self.det_objects = True self.det_was_active = False self.add_log('Детекция объектов возобновлена') except Exception as e: self.add_log(f'getPerson() error: {e}') def tick(self): if not self.cap: return ok, frame = self.cap.read() if not ok: if self.videoActive: self.add_log("Видео: конец файла") if self.frame_timer.isActive(): self.frame_timer.stop() if self.cap: try: self.cap.release() except: pass self.cap = None self.videoActive = self.cameraActive = False if hasattr(self, 'LCamera1'): self.LCamera1.clear() if hasattr(self, 'LCamera2'): self.LCamera2.clear() return img2 = frame img1 = frame.copy() if self.det_objects: try: r = self.yolo(frame, verbose=False, device='cpu')[0] if hasattr(r, 'boxes') and r.boxes is not None: keep = [self._ok(str(self.yolo.names[int(b.cls[0])]).lower()) for b in r.boxes] if any(keep): import numpy as np r.boxes = r.boxes[np.array(keep, dtype=bool)] else: r.boxes = r.boxes[:0] for b in r.boxes: cls_id = int(b.cls[0]) name = str(self.yolo.names[cls_id]).lower() x1, y1, x2, y2 = map(int, b.xyxy[0]) cx, cy = (x1 + x2) // 2, (y1 + y2) // 2 if self._dedup(name, cx, cy): self.add_log(f"Detected {name}") if self.moves_enabled and not self.people_present: self.run_session_yolo(name) else: self.add_log("Перемещение отключено" if not self.moves_enabled else "Ожидание: человек в зоне") img1 = r.plot() except Exception as e: self.add_log(f"YOLO error: {e}") if hasattr(self, 'LCamera1'): self._to_label(self.LCamera1, img1) if hasattr(self, 'LCamera2'): self._to_label(self.LCamera2, img2) def run_session_yolo(self, name: str): cat = self.cls2cat.get(name.lower()) if not cat: self.add_log(f"Нет маппинга для класса: {name}") return try: if cat == 'Брак': self._pick_and_place(self.rejectCell, self.rejectTrack) else: slot = self._choose_slot(cat) if slot is None: self.add_log(f"Нет свободных ячеек для {cat}") return self._pick_and_place(self.cells[slot], self.cellTrack[slot]) self.robot.play() while self.robot.getActualStateOut() != InterpreterStates.PROGRAM_IS_DONE.value: QtWidgets.QApplication.processEvents() time.sleep(0.05) self.add_log(f"Перемещено: {name} -> {cat}") except Exception as e: self.add_log(f"Ошибка перемещения: {e}") QtWidgets.QMessageBox.warning(self, "Ошибка", str(e)) def toggle_moves(self): self.moves_enabled = not self.moves_enabled try: self.BtMoveObjects.setText("Moves: ON" if self.moves_enabled else "Moves: OFF") except Exception: pass self.add_log("Перемещения: ON" if self.moves_enabled else "Перемещения: OFF")
  • GammaRay Quick Scenes deep information missing

    Unsolved
    2
    0 Votes
    2 Posts
    6k Views
    S
    you shoule choose Quick Scenes> Items. [image: 171d9f7c-ca85-4766-9747-fde06ca3a995.png]
  • Invalid property name clipPlanes.

    Unsolved
    2
    0 Votes
    2 Posts
    716 Views
    SGaistS
    Hi and welcome to devnet, From a quick look, these last two properties are available through: PerspectiveCamera.
  • Does ROOT (root.cern.ch) combine good with QT for data processing and histogram?

    Unsolved
    1
    0 Votes
    1 Posts
    401 Views
    No one has replied
  • Using Qt Program as a Module, but constantly get critical message

    Unsolved glib
    2
    0 Votes
    2 Posts
    1k Views
    Axel SpoerlA
    @Dream_Helium said in Using Qt Program as a Module, but constantly get critical message: using GModule to load a Qt module just that thought scares me! Which Qt module are you loading and why with GModule? What is the expected result? g_main_context_pop_thread_default: assertion 'stack != NULL' failed As rightfully said: That error message comes from glib, not from Qt. Maybe consult the gtk forum.
  • Qt Creator with pylon

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    SGaistS
    Hi, Did you try to build one of the pylon examples ?
  • Can't run the Qt OPC UA example

    Solved opcua
    4
    0 Votes
    4 Posts
    2k Views
    S
    Aha! found what I was looking for on a old blog post! Qt OPC UA will be available directly from the Qt installer for those holding a Qt for Automation license. [...] Users of one of the Open Source licenses will need to compile Qt OPC UA themselves. See here for a list of build recipes. this really should be clearly stated on documentation...
  • Qt SQL driver plugin for SQLCipher ( for Qt 5 )

    Unsolved
    6
    0 Votes
    6 Posts
    4k Views
    P
    check this repo: I've made a fork for this repo to make it work with Qt6 https://github.com/pourjour/qsqlcipher/tree/main