Results 1 to 5 of 5

Thread: How to rotate a QMainWindow

  1. #1
    Join Date
    Aug 2010
    Posts
    3
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default How to rotate a QMainWindow

    Hello guys,

    I have a question: I have a QMainWindow inside a QMdiArea, and is there any way to rotate that QMainWindow inside that QMdiArea.

    Thank a lots in advance for your help.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to rotate a QMainWindow

    Using QGraphicsView probably.

  3. #3
    Join Date
    Aug 2010
    Posts
    3
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to rotate a QMainWindow

    Thank you tbscope,
    But our situation is like that: we use Coin3D & QuarterWidget to draw 3D scene inside Qt QMainWindow. Let's say we have a 3D object, like a SoCone inside a QMainWindow, and we want to be able to rotate or transform the QMainWindow, while the SoCone object rotate by itself inside the window. We try to put the QMainWindow inside the QGraphicsScene, but we got this error: QPainter::begin: A paint device can only be painted by one painter at a time. And the window didn't appear in the QGraphicsScene.
    Do you have any ideas? Thanks.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to rotate a QMainWindow

    I find your request extremely strange. Why do you want to rotate the main window?

    Anyway, how did you add the main window to the graphics scene?

  5. #5
    Join Date
    Aug 2010
    Posts
    3
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to rotate a QMainWindow

    Hi tbscope,
    We want to be able to rotate or slant the QMainWindow, so that to have a special visual effect.
    We add the QMainWindow directly to QGraphicsScene using addWidget().

Similar Threads

  1. rotate in QState
    By estel in forum Qt Programming
    Replies: 0
    Last Post: 21st October 2009, 12:39
  2. Rotate a QRectF
    By whitefurrows in forum Qt Programming
    Replies: 5
    Last Post: 15th July 2009, 15:33
  3. rotate whole window
    By kernel_panic in forum Qt Programming
    Replies: 8
    Last Post: 12th March 2008, 18:40
  4. QPolygon rotate
    By xgoan in forum Qt Programming
    Replies: 3
    Last Post: 8th May 2007, 11:18
  5. QGraphicsRectItem::rotate()
    By LestorN in forum Qt Programming
    Replies: 1
    Last Post: 20th October 2006, 10:17

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.