Results 1 to 2 of 2

Thread: 4.3.1 vs 4.1.4 setfixedwidth (bugs??)

  1. #1
    Join Date
    Jan 2007
    Posts
    95
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default 4.3.1 vs 4.1.4 setfixedwidth (bugs??)

    I worked with visual studio 2005 and 4.1.4. Now I have installed 4.3.1 and works fine (I thought). I have 2 QDockWidget, one I want to be fixed (it's width) and the other no fixed when i resize the windows.
    When I compile my project with 4.1.4 version works fine, but with this version the two QtDockwidget resize. My code is:

    Qt Code:
    1. glWidgetArea = new QScrollArea();
    2. glWidgetArea->setWidget(glWidget);
    3. glWidgetArea->setWidgetResizable(true);
    4. glWidgetArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    5. glWidgetArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    6. glWidgetArea->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    7. glWidgetArea->setMinimumSize(100, 100);
    8.  
    9. QDockWidget *ogldock = new QDockWidget(parent);
    10. ogldock->setAllowedAreas(Qt::LeftDockWidgetArea);
    11. ogldock->setFeatures(QDockWidget::NoDockWidgetFeatures);
    12. ogldock->setWidget(glWidgetArea); <- this resize
    13.  
    14. QDockWidget *gdock = new QDockWidget(parent);
    15. gdock->setAllowedAreas(Qt::RightDockWidgetArea);
    16. gdock->setFeatures(QDockWidget::NoDockWidgetFeatures);
    17. gdock->setFixedWidth(250); <- this would be fixed, but it doesn't
    18. gdock->setWidget(toolBox);
    To copy to clipboard, switch view to plain text mode 

    I have prove this at the end of this code

    Qt Code:
    1. toolBox->setFixedWidth(250);
    To copy to clipboard, switch view to plain text mode 

    and toolBox inside gdock is fixed but the area around resize. ogldock and gdock area resize 50% for each.

  2. #2
    Join Date
    Jan 2007
    Posts
    95
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 4.3.1 vs 4.1.4 setfixedwidth (bugs??)

    I have just solve my problem with this line:

    gdock->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Ign ored);


    Thanks

Similar Threads

  1. Qt 4.3.0 lots of Bugs!
    By VireX in forum Qt Programming
    Replies: 69
    Last Post: 20th June 2007, 22:05

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.