Results 1 to 5 of 5

Thread: showFullScreen minimizes my window.

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default showFullScreen minimizes my window.

    Hi friends,

    im showing a QGraphicsView in full screen mode using
    showFullScreen

    like this ,,

    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QApplication a(argc, argv);
    4. Widget w;
    5. w.show();
    6. w.showFullScreen();
    7. return a.exec();
    8. }
    To copy to clipboard, switch view to plain text mode 

    the window is appearing in full sceen but minimized at first time when i start it for the first time ... when i start the application it is in the panel minimized and not poping up ..
    im using resize event in the GraphicsView ...

    Please help me ... thanks in advance ..
    "Behind every great fortune lies a crime" - Balzac

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: showFullScreen minimizes my window.

    You are using resizeEvent() to do what?

  3. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: showFullScreen minimizes my window.

    Quote Originally Posted by ChrisW67 View Post
    You are using resizeEvent() to do what?
    sorry .. i thought of mentioning it with .. yes im using resize event in graphicsView

    Qt Code:
    1. QGraphicsView::resizeEvent(event);
    2. fitInView(scene()->sceneRect(), Qt::KeepAspectRatio);
    To copy to clipboard, switch view to plain text mode 

    AND thanks for reply !!
    "Behind every great fortune lies a crime" - Balzac

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: showFullScreen minimizes my window.

    ... and are you passing the event to the parent class so that normal resizing can be completed? One line in isolation is insufficient for us to know.

  5. #5
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: showFullScreen minimizes my window.

    Thanks for the reply!!

    Quote Originally Posted by ChrisW67 View Post
    ... and are you passing the event to the parent class so that normal resizing can be completed? One line in isolation is insufficient for us to know.
    no im not doing any thing other than that .. the graphicsView is my arch parent and im reimplementing the resize Event like this only ..
    im showing this GraphicsView widget only ...

    Qt Code:
    1. void
    2. Widget::resizeEvent(QResizeEvent *event)
    3. {
    4. QGraphicsView::resizeEvent(event);
    5. fitInView(scene()->sceneRect(), Qt::KeepAspectRatio);
    6.  
    7. }
    To copy to clipboard, switch view to plain text mode 
    if u want more in the code

    my scene representation ...
    Qt Code:
    1. QGraphicsScene *scene = new QGraphicsScene(this);
    2. scene->setBackgroundBrush(QColor(80, 18, 60));
    3. scene->setItemIndexMethod(QGraphicsScene::NoIndex);
    4. scene->addItem(startButton);
    5.  
    6. scene->setSceneRect(QRectF(0, 0, 1200, 1000) );
    To copy to clipboard, switch view to plain text mode 

    my view settings ..
    Qt Code:
    1. setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    2. setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    3. setMinimumSize(50, 50);
    4. setViewportUpdateMode(FullViewportUpdate);
    5. setCacheMode(CacheBackground);
    6. setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform | QPainter::TextAntialiasing);
    To copy to clipboard, switch view to plain text mode 

    more than that it crashed when i try to use showFullScreen() function in the graphicsView constructor itself!!
    "Behind every great fortune lies a crime" - Balzac

Similar Threads

  1. focusChanged & showFullScreen problem
    By RichBond in forum Qt Programming
    Replies: 0
    Last Post: 4th September 2012, 17:33
  2. Replies: 2
    Last Post: 25th June 2012, 19:14
  3. ShowFullScreen on QStackWidget don't work
    By Ratheendrans in forum Qt Programming
    Replies: 2
    Last Post: 10th May 2010, 18:34
  4. Replies: 0
    Last Post: 2nd February 2010, 10:55
  5. Odd behaviour with showFullScreen
    By KShots in forum Qt Programming
    Replies: 4
    Last Post: 17th August 2007, 13:12

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
  •  
Qt is a trademark of The Qt Company.