You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, February 8th 2012, 11:40pm

Displaying an image in QGLWidget

I have a QGLWidget (two of them, actually) in a QGridLayout in a QMainWindow. I'm trying to display the contents of an image file over a background. I can get the background onto it until paintEvent runs; then, instead of drawing the image on top of the background, it simply erases the backround.

(Change .cpp to .h to get header files.)
the QGLWidget: http://bazaar.launchpad.net/~chaos2d-dev/chaos2d/main/view/head:/client/cpp/qt/ui/view.cpp
the QMainWindow: http://bazaar.launchpad.net/~chaos2d-dev/chaos2d/main/view/head:/client/cpp/qt/ui/frontend.cpp
all files: http://bazaar.launchpad.net/~chaos2d-dev/chaos2d/main/files/head:/client/cpp/qt/

The project is attached in a zip file with irrelevant portions removed.

I can't find examples for this anywhere, and as far as I can tell I'm following the documentation perfectly. I've been hung up on this problem for two days now, I believe. Help, please!
Jesdisciple has attached the following file:
  • Chaos2D.zip (44.29 kB - 5 times downloaded - latest: Feb 27th 2013, 11:03am)

This post has been edited 6 times, last edit by "Jesdisciple" (Feb 10th 2012, 6:59pm)


2

Friday, February 10th 2012, 6:19pm

(bump)

3

Tuesday, May 8th 2012, 2:14am

May be I am late in this post,
however may be this link will help you.
http://www.robot-home.it/blog/informatic…magini/?lang=en

-romy

jiapei100

Beginner

  • "jiapei100" is male

Posts: 36

Location: Surrey, BC, Canada

Occupation: Programmer

  • Send private message

4

Tuesday, February 26th 2013, 12:45pm

I've got exactly the same question to ask...
Welcome to Vision Open
http://www.visionopen.com

Similar threads