Bug 173469 - QDockWidget grows endlessly (and fast) without doing anything
Summary: QDockWidget grows endlessly (and fast) without doing anything
Status: RESOLVED UPSTREAM
Alias: None
Product: Oxygen
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Camilla Boemann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-24 21:56 UTC by Bernhard Friedreich
Modified: 2009-08-08 01:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Designer file where this bug occurs (19.22 KB, application/x-designer)
2008-10-26 10:33 UTC, Bernhard Friedreich
Details
testcase (367 bytes, text/plain)
2009-03-15 20:21 UTC, Huynh Huu Long
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Friedreich 2008-10-24 21:56:04 UTC
Version:            (using Devel)
Compiler:          g++ (SUSE Linux) 4.3.3 20081002 (prerelease) [gcc-4_3-branch revision 140831] 
OS:                Linux
Installed from:    Compiled sources

When developing a Qt program and compiling it under KDE4 I saw with real disbelief that when I start my program the QDockWidget grows and grows until wide beyond the screen edge.. afaics it never stops to grow.. the PC get's slower and slower too.. and that's on a highend notebook (2,5GHz dualcore, 4GB, nvidia 9600m gt)

The strange thing is: that's on openSUSE 11.1 (beta 3) with KDE trunk compiled from source. On Mandriva 2009 with KDE 4.1.2 packages installed it doesn't happen.

I tried it with a different style (plastique) and the error was gone! So I think it must be related to oxygen. It also works as expected on ALL other platforms (windows xp, vista, macos, mandriva, gentoo)

The program is called Allevo (it's a costcalculation/doublebook keepig learn program) and can be found here:

http://sourceforge.net/projects/allevo

svn:

svn co https://allevo.svn.sourceforge.net/svnroot/allevo/trunk/src allevo 

It's under heavy development atm (comparable to the development between KDE3 and KDE4) so don't expect anything to work if you try ^^ it's just the dockwidget on the left side of the screen (the sidebar) which is absolutely.. strange

If someone can provide me with at least a hint about how I could debug that problem I would be really thankful.
Comment 1 Camilla Boemann 2008-10-25 08:52:28 UTC
This is a case of Oxygen using a feature that was a bug in Qt. I'm happy to inform you that it will be fixed in Qt 4.5

Also we had another problem in KOffice but that was partly selfinflicted. Hint: if you use a widget inside with a maximum size that value is inherited to the dockwidget even after you remove the mainwidget and replace it by something else. Setting the maximumsize to a high value when switching widgets solved that for us.

Anyway - i suggest that you use the newest Qt and go through your code s that you are not doing anything youself - then it will be sorted out.

All I can say in KOffice we had the problem, but don't anymore.
Comment 2 Bernhard Friedreich 2008-10-25 16:25:14 UTC
Thanks for your answer!

The problem is that I AM actually using Qt 4.5TP (Allevo + KDE trunk) .. or will it just be fixed some time until 4.5 get's released?

I don't think I can change anything on my CODE because the sidebar was simply created in designer (althought it was created at first with 4.4) ...
Comment 3 Bernhard Friedreich 2008-10-25 16:27:08 UTC
I wish I could edit my last entry... 

Just tried opening the Ui file in designer... it keeps growing their too .. also with a rapid increase and making the window hang (have to kill it)
Comment 4 Huynh Huu Long 2008-10-26 01:35:49 UTC
Culprit seems to be the sizePolicy of that sidebarTabWidget. When choosing anything different than Fixed it grows ...
Comment 5 Bernhard Friedreich 2008-10-26 10:33:28 UTC
Created attachment 28153 [details]
Designer file where this bug occurs

Attached is the designer file in which the bug occurs.. you just need to open it in designer end see what I mean (using oxygen style).. hf ...
Comment 6 Dennis Nienhüser 2009-02-05 22:52:17 UTC
I ran into what I think is the same problem using merkaartor (Qt based OpenStreetMap editor) from SVN, see http://trac.openstreetmap.org/ticket/1557. The QMainWindow that grows repeatedly calls QDockWidget->SetWidget(new QWidget) there.

The problem appears with KDE 4.2.0 and KDE from trunk (rev. 920402, 2009-02-02), Qt version 4.4.3.
Comment 7 Huynh Huu Long 2009-02-07 19:13:02 UTC
Again somehow it boils down to the following line of code ...
2225 widget->setContentsMargins(3,0,3,3);
This would work btw:
2225 widget->setContentsMargins(0,0,0,3);
which means we are unable to set left and right margins? I guess there has to be black magic behind this code :)

regards
Comment 8 Bernhard Friedreich 2009-02-14 13:40:37 UTC
I'm glad someone else is having the same issue now too.. maybe we can try fixing it :D
I'll try to look into it this weekend and will see if I can come up with a solution
Comment 9 Sven Lankes 2009-02-25 13:11:54 UTC
I'm also seeing this with merkaartor / qt 4.5-rc1
Comment 10 Camilla Boemann 2009-02-25 13:15:09 UTC
I'm trying to make a small qt example that i can use to debug the problem

btw, I see it with the ui file in designer too
Comment 11 Huynh Huu Long 2009-03-15 20:21:30 UTC
Created attachment 32147 [details]
testcase

"Works" with any style, I filed a bug report at Qt software yesterday. There's no answer yet.
Comment 12 Bernhard Friedreich 2009-03-15 20:39:26 UTC
"works" also on Windows (Vista).. so it really seems to be something deeper inside Qt .. my first bug in Qt :D

Thanks for investigation :-)
Comment 13 Huynh Huu Long 2009-03-18 02:23:27 UTC
http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=248604

So the question is now, whether oxygen has to adapt for the time being ...
Comment 14 Huynh Huu Long 2009-03-21 13:43:30 UTC
This is fixed in Qt 4.5.1, will it be released before KDE 4.3?