PDA

View Full Version : Undocking Problem a Bug?



qtoptus
10th March 2014, 05:22
Hello,

Qt 5.0 QDockWidget title bar disappears when it's undocked. Is there a property I need to set to keep the decoration/title-bar?

I thought it might be a bug, so I tried to build the Qt 5.2 from source under Windows 7 VS2008, but the compiler fails with an error: cannot open include file "unordered_map"
Do I need to point the build process to boost library? How?

Thanks!

ChrisW67
10th March 2014, 06:05
My dock widgets keep a title bar when undocked. See if the problem exists in the Dock Widgets example. Please provide a small example that demonstrates the problem.

The class unordered_map is part of C++11. You need to have a compiler toolchain with adequate C++11 support to compile Qt5 with the -c++11 option. VS2008 is not good enough.

qtoptus
10th March 2014, 18:50
I'm creating QDockWidget using the designer. So is not there anyway I can build Qt 5.2 using VS2008?

ChrisW67
10th March 2014, 20:30
Yes, I expect you can build Qt5 with VS2008 but you must configure it without the C++11 support.

That has nothing to do with the problem you claim. Can you provide the information I asked for?

qtoptus
11th March 2014, 05:57
The dock widget examples work, mine worked but this is the problem I found:

My application has a window next to the docked used for drawing. It's created as OpenGL custom window. When it's created with OpenGL the titlebar of the dock widget disappears when undocked. Tried to create the window as DirectX11 enabled, and the same problem occurs. Note that my rendering window is a custom window which sets its own rendering context, maybe that's the problem, though not sure how it's related???

Thanks.

qtoptus
12th March 2014, 04:33
I want to build and use Qt 5.2.1 because I think what's happening with Qt 5.0.1 is apparently a BUGGGGGGGGGGGGGG

Unfortunately building with option -no-c++11 still fails with the same error...

ChrisW67
13th March 2014, 08:19
You have yet to demonstrate the "bug" in any way that is useful to us.

As for the build. The only place unordered_map occurs in the Qt5 source is within the ANGLE code. That code is all #ifdef wrapped to do something different for MSVC, include and use hash_map, instead of using unordered_map. Not sure how you are getting offending code. There is a comment in the qtbase/src/angle/src/config.pri file that C++11 is required to build under MingW and then it forces that option: perhaps that has a bearing, perhaps not. All that is unchanged in 5.2.1 anyway.

You could try compiling a desktop OpenGL version:
configure -opengl desktop

qtoptus
17th March 2014, 03:52
Changed my mind about compiling with MinGW after tried Qt Creator...I would stick with VS.

So my main problem was the disappearing titlebar from undocked widget, and after trying Qt 5.2.1 for VS 2012, the problem solved! Fantastic!