# \#highgui

**URL:** https://forum.opencv.org/tag/highgui/96.md

[Latest](https://forum.opencv.org/latest.md) · [Categories](https://forum.opencv.org/categories.md) · [Tags](https://forum.opencv.org/tags.md)

---

## [Toolbar Definition](https://forum.opencv.org/t/toolbar-definition/24720)

<div class="topic-metadata">

**Author:** [@danielc](https://forum.opencv.org/u/danielc)\
**Replies:** 0\
**Last updated:** [September 21, 2026, 11:55pm UTC](https://forum.opencv.org/t/toolbar-definition/24720 "2026-09-21T23:55:20Z")

</div>

Hello all, I am using Opencv V5 C++ and Qt6 cv::imshow(“Display Window”, image); How do I setup/modify toolbar? or opencv qt toolbar Definition? in source code. Thank you.

---

## [Can't get waitKey() to work](https://forum.opencv.org/t/cant-get-waitkey-to-work/24257)

<div class="topic-metadata">

**Author:** [@jogl](https://forum.opencv.org/u/jogl)\
**Replies:** 3\
**Last updated:** [December 16, 2025, 4:09pm UTC](https://forum.opencv.org/t/cant-get-waitkey-to-work/24257 "2025-12-16T16:09:36Z")

</div>

My head is getting sore. What am I doing wrong? This: import cv2 print(“here”) cv2.waitKey(5000000) print(“jp”) cv2.destroyAllWindows() does not wait whether I have 5,000,000, 0 (zero), or 1 as argument. Just print…

---

## [OpenCV imshow Error: QSocketNotifier: Can only be used with threads started with QThread (No Qt Usage)](https://forum.opencv.org/t/opencv-imshow-error-qsocketnotifier-can-only-be-used-with-threads-started-with-qthread-no-qt-usage/21064)

<div class="topic-metadata">

**Author:** [@fdl](https://forum.opencv.org/u/fdl)\
**Replies:** 1\
**Last updated:** [May 23, 2025, 8:31am UTC](https://forum.opencv.org/t/opencv-imshow-error-qsocketnotifier-can-only-be-used-with-threads-started-with-qthread-no-qt-usage/21064 "2025-05-23T08:31:58Z")

</div>

When calling cv::imshow to display an image, the program throws the error: QSocketNotifier: Can only be used with threads started with QThread. I confirm that my code does not directly use the Qt library (no Qt headers…

---

## [Does OpenCV 4.11.0 have QT support?](https://forum.opencv.org/t/does-opencv-4-11-0-have-qt-support/20405)

<div class="topic-metadata">

**Author:** [@Devin\_11](https://forum.opencv.org/u/Devin_11)\
**Replies:** 3\
**Last updated:** [March 5, 2025, 10:58am UTC](https://forum.opencv.org/t/does-opencv-4-11-0-have-qt-support/20405 "2025-03-05T10:58:18Z")

</div>

I am trying to build a C++ OpenCV application with CMake, I checked the options for the OpenCV config but can not find the WITH\_QT option, so i am confused if I can build a OpenCV 4.11.0 application with Qt GUI interface…

---

## [I want to overlap an image over the bottom of the window](https://forum.opencv.org/t/i-want-to-overlap-an-image-over-the-bottom-of-the-window/20294)

<div class="topic-metadata">

**Author:** [@billtheitgeek](https://forum.opencv.org/u/billtheitgeek)\
**Replies:** 0\
**Last updated:** [February 20, 2025, 10:23pm UTC](https://forum.opencv.org/t/i-want-to-overlap-an-image-over-the-bottom-of-the-window/20294 "2025-02-20T22:23:31Z")

</div>

I’ve been experimenting with an implementation of a radio dial in a window (to be displayed through an antique radio window). I have the circular dial image that would normally be a round plastic disc inside the radio. …

---

## [OpenCV update breaks waitKey behaviour](https://forum.opencv.org/t/opencv-update-breaks-waitkey-behaviour/20251)

<div class="topic-metadata">

**Author:** [@Gophys](https://forum.opencv.org/u/Gophys)\
**Replies:** 1\
**Last updated:** [February 17, 2025, 4:01pm UTC](https://forum.opencv.org/t/opencv-update-breaks-waitkey-behaviour/20251 "2025-02-17T16:01:44Z")

</div>

I took back a python project that uses openCV to show images in a separate window. The project is in python 3.8 and I am upgrading it to python 3.12. I also updating openCV from version 4.4.0.46 to version 4.11.0.86. Th…

---

## [1 trackBar for 2 windows or 1 window with 2 videos](https://forum.opencv.org/t/1-trackbar-for-2-windows-or-1-window-with-2-videos/19608)

<div class="topic-metadata">

**Author:** [@Alan\_Miller](https://forum.opencv.org/u/Alan_Miller)\
**Replies:** 1\
**Last updated:** [December 25, 2024, 2:53am UTC](https://forum.opencv.org/t/1-trackbar-for-2-windows-or-1-window-with-2-videos/19608 "2024-12-25T02:53:14Z")

</div>

I have 2 video files that 1 want to review frame by frame with 1 trackbar. Is it possible to show 2 videos in 1 named window and have the trackbar scroll through the frames of both videos? The videos are sports-motion…

---

## [Suggestions for motion detection method](https://forum.opencv.org/t/suggestions-for-motion-detection-method/19568)

<div class="topic-metadata">

**Author:** [@Alan\_Miller](https://forum.opencv.org/u/Alan_Miller)\
**Replies:** 7\
**Last updated:** [December 21, 2024, 12:17am UTC](https://forum.opencv.org/t/suggestions-for-motion-detection-method/19568 "2024-12-21T00:17:07Z")

</div>

I’m still just learning opencv so I’m overwhelmed with all the different methods available to detect motion (frame differencing, background subtraction,…) so I’m looking here for suggestions. I’m trying to build a small…

---

## [createTrackbar warns that value pointer is deprecated. But is there any other way to set trackbar's initial position?](https://forum.opencv.org/t/createtrackbar-warns-that-value-pointer-is-deprecated-but-is-there-any-other-way-to-set-trackbars-initial-position/7675)

<div class="topic-metadata">

**Author:** [@JohnKnow](https://forum.opencv.org/u/JohnKnow)\
**Replies:** 8\
**Last updated:** [November 16, 2024, 10:18am UTC](https://forum.opencv.org/t/createtrackbar-warns-that-value-pointer-is-deprecated-but-is-there-any-other-way-to-set-trackbars-initial-position/7675 "2024-11-16T10:18:33Z")

</div>

When I create trackbar by this code createTrackbar( "Canny thresh:", source\_window, &thresh, thresh\_max, thresh\_callback ); Below warning is reported: \[ WARN:0@0.030\] global D:\\projects\\opencv-src\\modules\\highgui\\src\\…

---

## [Gtk-WARNING \*\*: 23:30:56.598: cannot open display:](https://forum.opencv.org/t/gtk-warning-2356-598-cannot-open-display/19225)

<div class="topic-metadata">

**Author:** [@saeed](https://forum.opencv.org/u/saeed)\
**Replies:** 4\
**Last updated:** [November 9, 2024, 11:33am UTC](https://forum.opencv.org/t/gtk-warning-2356-598-cannot-open-display/19225 "2024-11-09T11:33:18Z")

</div>

hi all i am trying to write my first opencv in windwos 10 , i’m using cygwin, my code llike below int main( int argc, char\*\* argv ) { Mat img = imread( argv\[1\], 0 ); if( img.empty() ) return -1; namedWindow( “E2”, c…

---

## [Is MouseCallback running in another thread?](https://forum.opencv.org/t/is-mousecallback-running-in-another-thread/18814)

<div class="topic-metadata">

**Author:** [@zzzhhh](https://forum.opencv.org/u/zzzhhh)\
**Replies:** 3\
**Last updated:** [September 24, 2024, 4:42pm UTC](https://forum.opencv.org/t/is-mousecallback-running-in-another-thread/18814 "2024-09-24T16:42:09Z")

</div>

Assume I have a main thread which calls namedWindow, setMouseCallback, imread, imshow, etc. Is MouseCallback running in another different thread from the main thread when a mouse event occurs? This is kind of important …

---

## [Android sdk with highgui java api support](https://forum.opencv.org/t/android-sdk-with-highgui-java-api-support/18699)

<div class="topic-metadata">

**Author:** [@shajiapg](https://forum.opencv.org/u/shajiapg)\
**Replies:** 4\
**Last updated:** [September 12, 2024, 8:56am UTC](https://forum.opencv.org/t/android-sdk-with-highgui-java-api-support/18699 "2024-09-12T08:56:50Z")

</div>

Can anyone share the steps to build openCV 4.9.0. android sdk with highgui java api support

---

## [Python OpenCV IMSHOW error when running even when provided all parameters](https://forum.opencv.org/t/python-opencv-imshow-error-when-running-even-when-provided-all-parameters/18459)

<div class="topic-metadata">

**Author:** [@sns123](https://forum.opencv.org/u/sns123)\
**Replies:** 2\
**Last updated:** [August 9, 2024, 12:15am UTC](https://forum.opencv.org/t/python-opencv-imshow-error-when-running-even-when-provided-all-parameters/18459 "2024-08-09T00:15:50Z")

</div>

I am using OpenCV for my program but I am getting an error during the cv2.imshow command. My program is trying to process an MP4 video and crop the licence plates from the cars involved. I am following this tutorial for…

---

## [QObject::killTimer: Timers cannot be stopped from another thread (when using waitKey function)](https://forum.opencv.org/t/qobject-timers-cannot-be-stopped-from-another-thread-when-using-waitkey-function/17903)

<div class="topic-metadata">

**Author:** [@alexek](https://forum.opencv.org/u/alexek)\
**Replies:** 2\
**Last updated:** [June 26, 2024, 2:05pm UTC](https://forum.opencv.org/t/qobject-timers-cannot-be-stopped-from-another-thread-when-using-waitkey-function/17903 "2024-06-26T14:05:50Z")

</div>

Hi, all! I’m using 2 threads in my code (both started from main thread which sleeps and waits till the 2 threds will finish), one decodes frames, the other blits them to a window. In the thread that blits, I use the fol…

---

## [Cv::imshow opens a window with a strange UI interface](https://forum.opencv.org/t/cv-imshow-opens-a-window-with-a-strange-ui-interface/17778)

<div class="topic-metadata">

**Author:** [@JJRJ](https://forum.opencv.org/u/JJRJ)\
**Replies:** 2\
**Last updated:** [May 30, 2024, 12:57pm UTC](https://forum.opencv.org/t/cv-imshow-opens-a-window-with-a-strange-ui-interface/17778 "2024-05-30T12:57:19Z")

</div>

Hi! My device is a Jetson Nano 16GB with OpenCV version 4.5.4. When running an OpenCV sample, the UI of imshow looks different from the nomal one. And in another program, it’s unable to display the video.

---

## [Can't use moveWindow in Ubuntu 22.04](https://forum.opencv.org/t/cant-use-movewindow-in-ubuntu-22-04/17345)

<div class="topic-metadata">

**Author:** [@Digital101](https://forum.opencv.org/u/Digital101)\
**Replies:** 5\
**Last updated:** [April 23, 2024, 1:27pm UTC](https://forum.opencv.org/t/cant-use-movewindow-in-ubuntu-22-04/17345 "2024-04-23T13:27:55Z")

</div>

Problem I’m using a projector that’s being detected by my laptop that’s running Linux and used as a second monitor to project a pattern onto an object that I want imaged. I’m wanting to use the moveWindow() function to …

---

## [Which GUI is used by my opencv program?](https://forum.opencv.org/t/which-gui-is-used-by-my-opencv-program/17163)

<div class="topic-metadata">

**Author:** [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Replies:** 1\
**Last updated:** [April 4, 2024, 5:21pm UTC](https://forum.opencv.org/t/which-gui-is-used-by-my-opencv-program/17163 "2024-04-04T17:21:48Z")

</div>

Hi, I want to write a program for windows, macos and WSL2 using pollkey. I need arrow key. On windows left arrow key is #define KEY\_CODE\_LEFT\_ARROW 0x250000 Ubuntu WSL2 gtk3 #define KEY\_CODE\_LEFT\_ARROW 0x10ff51 Mac…

---

## [Libgtkglext incorrect include path prevents succesful build](https://forum.opencv.org/t/libgtkglext-incorrect-include-path-prevents-succesful-build/7514)

<div class="topic-metadata">

**Author:** [@fdw](https://forum.opencv.org/u/fdw)\
**Replies:** 2\
**Last updated:** [March 26, 2024, 11:19pm UTC](https://forum.opencv.org/t/libgtkglext-incorrect-include-path-prevents-succesful-build/7514 "2024-03-26T23:19:18Z")

</div>

trying to build opencv 4.5.5 with opengl 4.6 (and libgtkglext1/libgtkglext1-dev) causes an error in Cmake the error: Cmake Error in modules/highgui/CMakeLists.txt imported target "ocv.3rdparty.gtkglext"includes non-ex…

---

## [GDK BadAccess error when opening window for first time inside docker](https://forum.opencv.org/t/gdk-badaccess-error-when-opening-window-for-first-time-inside-docker/11109)

<div class="topic-metadata">

**Author:** [@bartonp](https://forum.opencv.org/u/bartonp)\
**Replies:** 8\
**Last updated:** [March 16, 2024, 6:53am UTC](https://forum.opencv.org/t/gdk-badaccess-error-when-opening-window-for-first-time-inside-docker/11109 "2024-03-16T06:53:07Z")

</div>

I have a docker image with opencv installed via apt. When I run my program it crashes when opening an opencv window with cv2.namedWindow(WINDOW\_NAME, cv2.WINDOW\_NORMAL) resulting in the following error: (python3:218): G…

---

## [Capture image on custom key combination](https://forum.opencv.org/t/capture-image-on-custom-key-combination/16570)

<div class="topic-metadata">

**Author:** [@pd3rvr](https://forum.opencv.org/u/pd3rvr)\
**Replies:** 0\
**Last updated:** [February 23, 2024, 9:17am UTC](https://forum.opencv.org/t/capture-image-on-custom-key-combination/16570 "2024-02-23T09:17:48Z")

</div>

I have a short script to start camera on laptop. I want to start to capture image or record only when user customised key combination is used. Can anyone suggest how to get this done ? I have read the cv2.waitkey library…

---

## [aruco.drawAxis() gone?](https://forum.opencv.org/t/aruco-drawaxis-gone/10446)

<div class="topic-metadata">

**Author:** [@MattWTSN](https://forum.opencv.org/u/MattWTSN)\
**Replies:** 12\
**Last updated:** [February 5, 2024, 12:00pm UTC](https://forum.opencv.org/t/aruco-drawaxis-gone/10446 "2024-02-05T12:00:46Z")

</div>

An example code can be found here: ArUco Marker Tracking with OpenCV | by Ali Yasin Eser | Medium I used to use it without issues. I haven’t used OpenCV/Aruco for over a year and have changed PCs since then. Today I in…

---

## [Could not load the QT platform "xcb" even though it was found](https://forum.opencv.org/t/could-not-load-the-qt-platform-xcb-even-though-it-was-found/1011)

<div class="topic-metadata">

**Author:** [@baskpann](https://forum.opencv.org/u/baskpann)\
**Replies:** 3\
**Last updated:** [December 11, 2023, 6:41am UTC](https://forum.opencv.org/t/could-not-load-the-qt-platform-xcb-even-though-it-was-found/1011 "2023-12-11T06:41:04Z")

</div>

System information (version) OpenCV =\> 4.5.1.48 Operating System / Platform =\> Ubuntu 20.10 Compiler =\> Visual Studio 2020 Detailed description I’m trying to run a face recognition algorithm in python3.8.5(in anaconda4…

---

## [Questions about using namedWindow() and imshow() in Java](https://forum.opencv.org/t/questions-about-using-namedwindow-and-imshow-in-java/15714)

<div class="topic-metadata">

**Author:** [@peter233](https://forum.opencv.org/u/peter233)\
**Replies:** 4\
**Last updated:** [December 5, 2023, 7:04am UTC](https://forum.opencv.org/t/questions-about-using-namedwindow-and-imshow-in-java/15714 "2023-12-05T07:04:20Z")

</div>

How can I modify my Java code using the namedWindow() and imshow() functions to open and display two windows simultaneously? Currently, when I run the code, it opens and closes a window repeatedly instead of keeping both…

---

## [Deactivate ROI dragging in imshow](https://forum.opencv.org/t/deactivate-roi-dragging-in-imshow/2251)

<div class="topic-metadata">

**Author:** [@sebko\_iic](https://forum.opencv.org/u/sebko_iic)\
**Replies:** 4\
**Last updated:** [November 30, 2023, 11:47am UTC](https://forum.opencv.org/t/deactivate-roi-dragging-in-imshow/2251 "2023-11-30T11:47:51Z")

</div>

I’m working with imshow. When you zoom into a displayed image with your mouse wheel you can use the left mouse button to drag the ROI. As I am building an application on top of imshow this is really annoying. Can you dea…

---

## [GTK failed to load module](https://forum.opencv.org/t/gtk-failed-to-load-module/15663)

<div class="topic-metadata">

**Author:** [@Kumar\_Utkarsh](https://forum.opencv.org/u/Kumar_Utkarsh)\
**Replies:** 0\
**Last updated:** [November 29, 2023, 4:45am UTC](https://forum.opencv.org/t/gtk-failed-to-load-module/15663 "2023-11-29T04:45:35Z")

</div>

While running the executable file I am getting the error GTK failed to load module gail GTK failed to load module atk gail How to resolve this error

---

## [Cap.release() cv2.destroyAllWindows() crash on Mac](https://forum.opencv.org/t/cap-release-cv2-destroyallwindows-crash-on-mac/15612)

<div class="topic-metadata">

**Author:** [@Luigi](https://forum.opencv.org/u/Luigi)\
**Replies:** 0\
**Last updated:** [November 22, 2023, 2:06pm UTC](https://forum.opencv.org/t/cap-release-cv2-destroyallwindows-crash-on-mac/15612 "2023-11-22T14:06:33Z")

</div>

Hi! everytime i press the “q” on the keyboard the camera freezes and crashes. Any advice on why this happens? cap = cv2.VideoCapture(0) while cap.isOpened(): ret, frame = cap.read() cv2.imshow("Image Co…

---

## [openCV (openGL support) display usage](https://forum.opencv.org/t/opencv-opengl-support-display-usage/15433)

<div class="topic-metadata">

**Author:** [@Ziri](https://forum.opencv.org/u/Ziri)\
**Replies:** 3\
**Last updated:** [November 16, 2023, 5:56am UTC](https://forum.opencv.org/t/opencv-opengl-support-display-usage/15433 "2023-11-16T05:56:38Z")

</div>

Is there any minimal example of displaying and image , rectangle , text using : cv::namedWindow(DISPLAY\_WINDOW\_NAME, cv::WINDOW\_OPENGL); I was able to display an image using this callback function : void on\_image\_…

---

## [Defect in imshow() with Qt which truncates displayed XY coordinates](https://forum.opencv.org/t/defect-in-imshow-with-qt-which-truncates-displayed-xy-coordinates/14975)

<div class="topic-metadata">

**Author:** [@Brian](https://forum.opencv.org/u/Brian)\
**Replies:** 11\
**Last updated:** [October 24, 2023, 4:51pm UTC](https://forum.opencv.org/t/defect-in-imshow-with-qt-which-truncates-displayed-xy-coordinates/14975 "2023-10-24T16:51:39Z")

</div>

There is an example program to test the opencv Python install which pops up a window displaying an image and writes the mouse pointer XY coordinates to the lower left hand corner of the window. Half of the coordinates fa…

---

## [Window.cpp:1255: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support](https://forum.opencv.org/t/window-cpp-error-2-unspecified-error-the-function-is-not-implemented-rebuild-the-library-with-windows-gtk-2-x-or-cocoa-support/14317)

<div class="topic-metadata">

**Author:** [@Hanz\_Uchiha](https://forum.opencv.org/u/Hanz_Uchiha)\
**Replies:** 4\
**Last updated:** [August 22, 2023, 6:41am UTC](https://forum.opencv.org/t/window-cpp-error-2-unspecified-error-the-function-is-not-implemented-rebuild-the-library-with-windows-gtk-2-x-or-cocoa-support/14317 "2023-08-22T06:41:56Z")

</div>

Hello. I am getting this error when I am running my code. Everything works with my code. I started having this problem when I ran Yolov5 for my project. I am currently using Yolov8 for my project and everything worked fi…

---

## [trackBar not shown](https://forum.opencv.org/t/trackbar-not-shown/14260)

<div class="topic-metadata">

**Author:** [@dauriac](https://forum.opencv.org/u/dauriac)\
**Replies:** 2\
**Last updated:** [August 16, 2023, 9:48am UTC](https://forum.opencv.org/t/trackbar-not-shown/14260 "2023-08-16T09:48:49Z")

</div>

Hello, I followed https://docs.opencv.org/3.4/df/d0d/tutorial\_find\_contours.html modified according to https://forum.opencv.org/t/createtrackbar-warns-that-value-pointer-is-deprecated-but-is-there-any-other-way-to-set-t…

[Next page](https://forum.opencv.org/tag/highgui/96.md?match_all_tags=true&page=1&tags%5B%5D=highgui)
