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.
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.
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) ...
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)
Culprit seems to be the sizePolicy of that sidebarTabWidget. When choosing anything different than Fixed it grows ...
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 ...
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.
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
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
I'm also seeing this with merkaartor / qt 4.5-rc1
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
Created attachment 32147 [details] testcase "Works" with any style, I filed a bug report at Qt software yesterday. There's no answer yet.
"works" also on Windows (Vista).. so it really seems to be something deeper inside Qt .. my first bug in Qt :D Thanks for investigation :-)
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 ...
This is fixed in Qt 4.5.1, will it be released before KDE 4.3?