Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Displaying an image in a QGLWidget
Forum Updated to NodeBB v4.3 + New Features

Displaying an image in a QGLWidget

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jesdisciple
    wrote on last edited by
    #1

    I have a QGLWidget 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. (My other QGLWidget is drawing a triangle just fine.)

    (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 may be downloaded via Bazaar with:
    bzr branch lp:chaos2d/client/cpp/qt

    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 several days now, I believe. Help, please!

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jesdisciple
      wrote on last edited by
      #2

      (bump) Still stuck and anxious for a solution.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved