Congratulations to our 2022 Qt Champions!

Image gui with Qt

  • Hi everyone, I am totally new for Qt. I wanna do image gui using Qt. Is it possible to do without using openCV? If you have any ideas, pls kindly share me. Thanks millions.

  • Depends on what exactly you want to do!

    If all you want is showing some images on the GUI you certainly don't need OpenCV ;-)

    From the docs:

    bq. Qt provides four classes for handling image data: QImage, QPixmap, QBitmap and QPicture. QImage is designed and optimized for I/O, and for direct pixel access and manipulation, while QPixmap is designed and optimized for showing images on screen. QBitmap is only a convenience class that inherits QPixmap, ensuring a depth of 1. The isQBitmap() function returns true if a QPixmap object is really a bitmap, otherwise returns false. Finally, the QPicture class is a paint device that records and replays QPainter commands.

    Also there are QImageIOPlugin's for pretty much any relevant image format (JPEG, PNG, GIF, SVG, TIFF, etc).

  • Hi, Thanks for your info. Where can I get some infos using those classes? Thanks again

  • You say you are new to Qt, but have you at least looked at the Qt documentation ???

    You find it "online": or via Qt Assistant program ;-)

  • so let me ask you one more question. Is it possible to make image gui that capture image from webcam? I just only wanna use qt without openCV.

  • Probably depends on how you access the web-cam. I'm not aware of any Qt class that can do this directly. I guess on Windows you'd do that via DirectShow, on Linux via something like GStreamer. But as soon as you have queried the image data from the cam, you surely can present it on the screen via QPixmap.

  • I am using ubuntu 11.10. Coz I wanna display real time image gui using qt. So I also need to use GStreamer?? Thanks

  • I don't know how to start access my laptop webcam in qt code. Do you have any ideas to start? If so, pls kindly share me. Thanks :)

  • Perhaps you should start in the "documentation":/doc/qt-5.0/qtmultimedia/cameraoverview.html

Log in to reply