Results 1 to 4 of 4

Thread: resizeEvent for Dock Widgets

  1. #1
    Join Date
    Jul 2009
    Posts
    49
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default resizeEvent for Dock Widgets

    Hai

    In my pro I have a MainWindow, 4 Dock widgets, I want resizeEvent() for all DockWidgets. MainWindow resizeEvent() working properly.

    how to do this

    pl suggest me..

  2. #2
    Join Date
    Feb 2010
    Location
    Sydney, Australia
    Posts
    111
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: resizeEvent for Dock Widgets

    It should be possible to trap a resize event in QMainWindow using a customized
    Qt Code:
    1. void QWidget::resizeEvent ( QResizeEvent * event ) [virtual protected]
    To copy to clipboard, switch view to plain text mode 
    (QMainWindow inherits from QWidget) and then on each of your specialised QDockWidgets call an overidden
    Qt Code:
    1. bool QDockWidget::event ( QEvent * event ) [virtual protected]
    To copy to clipboard, switch view to plain text mode 
    which will then do whatever you need your specialised QDockWidget to do on a resize event.
    Last edited by stefanadelbert; 29th March 2010 at 06:38.

  3. #3
    Join Date
    Jul 2009
    Posts
    49
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: resizeEvent for Dock Widgets

    Hai

    I want to create a resizeEvent for QFrame.

    how to do this?

    Qt Code:
    1. void MainPlot::resizeEvent(QResizeEvent * )
    2. {
    3. ui->qwtTxtLegTittle->setGeometry(legend->x()+10,legend->y()-20,ui->qwtTxtLegTittle->width(),ui->qwtTxtLegTittle->height());
    4. ui->qwtTxtLegTittle->setText("Run.No Param. Avg.Mach ");
    5.  
    6. }
    7.  
    8. void MainPlot::ui->frame_4->resizeEvent(QResizeEvent*)
    9. {
    10.  
    11. }
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jul 2009
    Posts
    49
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: resizeEvent for QFrame Widgets

    Hai

    I want to create a resizeEvent for QFrame.

    how to do this?

    Qt Code:
    1. void MainPlot::resizeEvent(QResizeEvent * )
    2. {
    3. ui->qwtTxtLegTittle->setGeometry(legend->x()+10,legend->y()-20,ui->qwtTxtLegTittle->width(),ui->qwtTxtLegTittle->height());
    4. ui->qwtTxtLegTittle->setText("Run.No Param. Avg.Mach ");
    5.  
    6. }
    7.  
    8. void MainPlot::ui->frame_4->resizeEvent(QResizeEvent*)
    9. {
    10.  
    11. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Dock widget between widgets, not near the border
    By maverick_pol in forum Qt Programming
    Replies: 0
    Last Post: 22nd May 2009, 13:23
  2. hideEvent not propagated to tabified dock widgets
    By spud in forum Qt Programming
    Replies: 2
    Last Post: 4th October 2007, 09:00
  3. Evaluation Example Dock Widgets Hangs Windows
    By inflector in forum Qt Programming
    Replies: 6
    Last Post: 30th December 2006, 19:03
  4. Dock widgets PROBLEM
    By L1L0 in forum Qt Programming
    Replies: 8
    Last Post: 7th April 2006, 18:29
  5. How to movable dock widgets?
    By becond in forum Qt Tools
    Replies: 3
    Last Post: 21st February 2006, 19:57

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.