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. QGLWidget inside a QScrollArea
Forum Updated to NodeBB v4.3 + New Features

QGLWidget inside a QScrollArea

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.6k 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.
  • B Offline
    B Offline
    billconan
    wrote on last edited by
    #1

    Hello guys,

    I am working on a program which has a large OpenGL surface. I want to put it into a ScrollArea, so the user can pan with the scroll bars.

    But I figured that when I move the slider of the scrollbar, the OpenGL surface stays. I can't move it.

    Is there an example of this?

    Thank you.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      Use another approach: instead of putting it inside a QScrollArea, put it as the viewport of a QAbstractScrollArea, and then manage/use the scollbars' values and signals to scroll the OpenGL view itself?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • B Offline
        B Offline
        billconan
        wrote on last edited by
        #3

        Ok, I can try it. But why scrollArea doesn't support qglWidget?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on last edited by
          #4

          My guess would it be because it paints on screen.

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          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