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. QGraphicView and fixed viewport
Forum Updated to NodeBB v4.3 + New Features

QGraphicView and fixed viewport

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 3.3k 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.
  • N Offline
    N Offline
    nike1987
    wrote on last edited by
    #1

    When I resize my application, also resizing the viewport in scene coordinates. Is it possible fixed viewport size in scene? I tried do it using fitInView(), but I had a big problem with perfomance.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VitorAMJ
      wrote on last edited by
      #2

      Could you be more specific about what you want?
      -have you seen a setFixedSize(int, int) function in your mainwindow?
      -You can resize the Window to fit your GL stuff, one way to do that is to connect QGLWidget and your QMainWindow with a custom signal and a slot, passing two parameters (width and height) to resize your application.

      att,
      Vitor

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nike1987
        wrote on last edited by
        #3

        Yes, I have seen a setFixedSize(int, int), but it's not exactly what I want.This function fixed widget size.When I resize my application I need that resize widget size, but viewport size inside scene has been constant.
        I'm using QGraphicsView/QGraphicsScene, not OpenGL.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kkrzewniak
          wrote on last edited by
          #4

          Are you perhaps mistaking the viewports size with scene size?

          Me, Grimlock, not "nice dino". ME BASH BRAINS!

          1 Reply Last reply
          0
          • V Offline
            V Offline
            VitorAMJ
            wrote on last edited by
            #5

            Please provide some code showing what you are doing.

            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