[Qt-interest] How to force layout of Tab

Michael Jackson mike.jackson at bluequartz.net
Thu Jul 8 20:03:41 CEST 2010


I have an application that can display an image using QGraphicsViews and
QGraphicsScenes. The problem that I am having is that initially the views
are hidden in another tab of the user interface and I programmatically set
the image into the QGraphicsView/Scene. I am trying to scale the image so
that it fits into the current size of the QFrame that holds the
GraphicsView. The problem seems to be that until I physically make the tab
display that the UI has not laid out that part so I get QSize values that
are much smaller than they really are.
  Is there a way to "force" the tab to lay itself out so that the QFrame
expands like it should to the "correct" size so that when I ask for the
QFrame's size values I get something realistic?

Thanks
Mike Jackson




More information about the Qt-interest-old mailing list