Results 1 to 6 of 6

Thread: Resize event

  1. #1
    Join Date
    Jun 2006
    Posts
    34
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Resize event

    can some body explain how to post a resize event ??

    Thanks in advance,
    Boss

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resize event

    It should be enough to invoke QWidget::resize(), otherwise just create QResizeEvent on the heap and use QCoreApplication::postEvent().

  3. #3
    Join Date
    Jun 2006
    Posts
    34
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Resize event

    I tried using resize() but it didnt work for me , I will explain what I am trying to do, I have
    a class derived from QWidget and here is it's constructor,

    MyWidget::MyWidget( QString videoFileName, QWidget* parent, Qt::WFlags flags )
    :QWidget(parent,flags)
    {
    // Do I really have to turn off the double buffering?? -Make sure before commit.
    setAttribute(Qt::WA_PaintOnScreen);

    resize(300,300);
    .
    .
    .
    }

    Now If I trace this it doesnt post invoke resize

  4. #4
    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 event

    Is this widget in a layout?
    J-P Nurmi

  5. #5
    Join Date
    Jun 2006
    Posts
    34
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Resize event

    I am using it as the centralWidget of the QmainWindow
    QMainWindow mywindows;

    mywindows.setCentralWidget(&mywidget);

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resize event

    Quote Originally Posted by boss_bhat
    I am using it as the centralWidget of the QmainWindow
    Then you should resize the main window.

Similar Threads

  1. Workload in a QThread blocks main application's event loop ?
    By 0xBulbizarre in forum Qt Programming
    Replies: 14
    Last Post: 9th April 2006, 21:55
  2. no MouseButtonRelease event for QComboBox
    By Beluvius in forum Qt Programming
    Replies: 5
    Last Post: 31st March 2006, 12:58
  3. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 00:32
  4. Replies: 4
    Last Post: 23rd January 2006, 16:51
  5. What's the relationship between signal/slot and event?
    By twosnowman in forum Qt Programming
    Replies: 4
    Last Post: 11th January 2006, 17:13

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.