Results 1 to 7 of 7

Thread: Resize Widget To Desktop Size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Resize Widget To Desktop Size

    Quote Originally Posted by jpn View Post
    For me it works with Qt 4 without any additional tricks:
    Qt Code:
    1. #include <QtGui>
    2.  
    3. int main(int argc, char* argv[])
    4. {
    5. QApplication app(argc, argv);
    6. QWidget window;
    7. window.showMaximized();
    8. return app.exec();
    9. }
    To copy to clipboard, switch view to plain text mode 
    I know...I try some examples like your code and they works fine.
    However I'm working with Qt3.3.5 and window is a QMainWindow not a QWidget.
    I want remove the resize because I've some problmes with it...so any idea how to resolve the question?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Resize Widget To Desktop Size

    Quote Originally Posted by fruzzo View Post
    I know...I try some examples like your code and they works fine.
    In that case it is highly probable that the bug is on your side. It's just hidden somewhere in a big and complex project. That's why it's always a good idea to put up together a minimal compilable test application reproducing the problem.

    However I'm working with Qt3.3.5 and window is a QMainWindow not a QWidget.
    Actually, QMainWindow IS A QWidget. And QWidget::showFullScreen() functionality is implemented in QWidget code. I doubt you can reproduce the problem with a plain QMainWindow either. If you can reproduce it with a QMainWindow subclass, then the problem might be in that subclass.
    J-P Nurmi

  3. #3
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Resize Widget To Desktop Size

    How can I catch the signal emitted when launch mw->showMaximized()? And a way to know when resize (after showMaximized()) is completed?

Similar Threads

  1. Replies: 5
    Last Post: 25th May 2008, 08:22
  2. Move and resize with layout
    By waediowa in forum Qt Programming
    Replies: 0
    Last Post: 14th May 2008, 08:16
  3. Auto resize Widget to maximum avail. space
    By pospiech in forum Qt Programming
    Replies: 16
    Last Post: 15th April 2008, 14:47
  4. Simple custom widget won't size properly
    By MrGarbage in forum Qt Tools
    Replies: 2
    Last Post: 9th August 2007, 13:12
  5. Custom Shape Widget (resize)
    By PiXeL16 in forum Qt Programming
    Replies: 7
    Last Post: 12th February 2007, 07:00

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.