I am using opencv-python==3.3.0.10 and python==3.5.2. I have tried to solve above warning with many references available on the same platform but none of is working in my scenario. I was checking below code and i found irritating warning again and again. So i am curious to know why this kind of situations are coming.
import cv2 as cv
import numpy as np
path = 'sample.jpg'
img = cv.imread(path)
cv.imshow("", img)
cv.waitKey(0)
Here, I found the solution of my issue:
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
It seems that the Qt which ships with opencv-python somehow conflicts with the system Qt installation. So, when system will be updated and conflicts are removed, it started responding correctly.