- 
    Bug 
- 
    Resolution: Unresolved
- 
    P2: Important 
- 
    None
- 
    5.10.1
- 
    None
- 
    {noformat}
 Qt 5.10.1 (i386-little_endian-ilp32 shared (dynamic) release build; by MSVC 2015) on "windows"
 OS: Windows 10 (10.0) [winnt version 10.0.16299]
 
 Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 RTM HLE
 
 Environment:
 QTDIR="C:\Qt\5.9.1\msvc2017_64"
 
 Features: QT_NO_EXCEPTIONS
 
 Library info:
 PrefixPath: C:\Qt\Tools\QtCreator\bin
 DocumentationPath: C:\Qt\Tools\QtCreator\bin\doc
 HeadersPath: C:\Qt\Tools\QtCreator\bin\include
 LibrariesPath: C:\Qt\Tools\QtCreator\bin
 LibraryExecutablesPath: C:\Qt\Tools\QtCreator\bin\bin
 BinariesPath: C:\Qt\Tools\QtCreator\bin
 PluginsPath: C:\Qt\Tools\QtCreator\bin\plugins
 ImportsPath: C:\Qt\Tools\QtCreator\bin\imports
 Qml2ImportsPath: C:\Qt\Tools\QtCreator\bin\qml
 ArchDataPath: C:\Qt\Tools\QtCreator\bin
 DataPath: C:\Qt\Tools\QtCreator\bin
 TranslationsPath: C:\Qt\Tools\QtCreator\bin\translations
 ExamplesPath: C:\Qt\Tools\QtCreator\bin\examples
 TestsPath: C:\Qt\Tools\QtCreator\bin\tests
 SettingsPath:
 
 Standard paths [*...* denote writable entry]:
 DesktopLocation: "Desktop" *C:\Users\Owner\Desktop*
 DocumentsLocation: "Documents" *C:\Users\Owner\Documents*
 FontsLocation: "Fonts" *C:\WINDOWS\Fonts*
 ApplicationsLocation: "Applications" *C:\Users\Owner\AppData\Roaming\Microsoft\Windows\Start Menu\Programs*
 MusicLocation: "Music" *C:\Users\Owner\Music*
 MoviesLocation: "Movies" *C:\Users\Owner\Videos*
 PicturesLocation: "Pictures" *C:\Users\Owner\Pictures*
 TempLocation: "Temporary Directory" *C:\Users\Owner\AppData\Local\Temp*
 HomeLocation: "Home" *C:\Users\Owner*
 AppLocalDataLocation: "Application Data" *C:\Users\Owner\AppData\Local\QtProject\qtdiag* C:\ProgramData\QtProject\qtdiag C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data C:\Qt\Tools\QtCreator\bin\data\QtProject\qtdiag
 CacheLocation: "Cache" *C:\Users\Owner\AppData\Local\QtProject\qtdiag\cache*
 GenericDataLocation: "Shared Data" *C:\Users\Owner\AppData\Local* C:\ProgramData C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data
 RuntimeLocation: "Runtime" *C:\Users\Owner*
 ConfigLocation: "Configuration" *C:\Users\Owner\AppData\Local\QtProject\qtdiag* C:\ProgramData\QtProject\qtdiag C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data C:\Qt\Tools\QtCreator\bin\data\QtProject\qtdiag
 DownloadLocation: "Download" *C:\Users\Owner\Downloads*
 GenericCacheLocation: "Shared Cache" *C:\Users\Owner\AppData\Local\cache*
 GenericConfigLocation: "Shared Configuration" *C:\Users\Owner\AppData\Local* C:\ProgramData C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data
 AppDataLocation: "Application Data" *C:\Users\Owner\AppData\Roaming\QtProject\qtdiag* C:\ProgramData\QtProject\qtdiag C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data C:\Qt\Tools\QtCreator\bin\data\QtProject\qtdiag
 AppConfigLocation: "Application Configuration" *C:\Users\Owner\AppData\Local\QtProject\qtdiag* C:\ProgramData\QtProject\qtdiag C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data C:\Qt\Tools\QtCreator\bin\data\QtProject\qtdiag
 
 File selectors (increasing order of precedence):
 en_US windows winnt
 
 Network:
 Using "OpenSSL 1.0.2j 26 Sep 2016", version: 0x100020af
 
 Platform capabilities: ThreadedPixmaps OpenGL ThreadedOpenGL WindowMasks MultipleWindows ForeignWindows NonFullScreenWindows NativeWidgets WindowManagement RasterGLSurface AllGLFunctionsQueryable SwitchableWidgetComposition
 
 Style hints:
 mouseDoubleClickInterval: 500
 mousePressAndHoldInterval: 800
 startDragDistance: 10
 startDragTime: 500
 startDragVelocity: 0
 keyboardInputInterval: 400
 keyboardAutoRepeatRate: 32
 cursorFlashTime: 1060
 showIsFullScreen: 0
 showIsMaximized: 0
 passwordMaskDelay: 0
 passwordMaskCharacter: U+25CF
 fontSmoothingGamma: 1
 useRtlExtensions: 0
 setFocusOnTouchRelease: 0
 tabFocusBehavior: Qt::TabFocusBehavior(TabFocusAllControls)
 singleClickActivation: 0
 
 Additional style hints (QPlatformIntegration):
 ReplayMousePressOutsidePopup: 1
 
 Theme:
 Platforms requested : windows
 available :
 Styles requested : WindowsVista,Windows
 available : windowsvista,Windows,Fusion
 System font : "MS Shell Dlg 2" 8
 Native file dialog
 
 Fonts:
 General font : "MS Shell Dlg 2" 8
 Fixed font : "Courier New" 9
 Title font : "MS Shell Dlg 2" 8
 Smallest font: "MS Shell Dlg 2" 8
 
 Palette:
 WindowText: #ff000000
 Button: #fff0f0f0
 Light: #ffffffff
 Midlight: #ffe3e3e3
 Dark: #ffa0a0a0
 Mid: #ffa0a0a0
 Text: #ff000000
 BrightText: #ffffffff
 ButtonText: #ff000000
 Base: #ffffffff
 Window: #fff0f0f0
 Shadow: #ff696969
 Highlight: #ff0078d7
 HighlightedText: #ffffffff
 Link: #ff0000ff
 LinkVisited: #ffff00ff
 AlternateBase: #ffe9e7e3
 NoRole: #ff000000
 ToolTipBase: #ffffffdc
 ToolTipText: #ff000000
 
 Screens: 1, High DPI scaling: inactive
 # 0 "\\.\DISPLAY1" Depth: 32 Primary: yes
 Manufacturer:
 Model:
 Serial number:
 Geometry: 2560x1440+0+0 Available: 2560x1381+0+0
 Physical size: 553x311 mm Refresh: 60 Hz Power state: 0
 Physical DPI: 117.584,117.608 Logical DPI: 142,142 Subpixel_None
 DevicePixelRatio: 1 Pixel density: 1
 Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0
 
 Dynamic GL LibGL Vendor: ATI Technologies Inc.
 Renderer: AMD Radeon R9 200 Series
 Version: 4.5.13492 Compatibility Profile Context 22.19.677.257
 Shading language: 4.50
 Format: Version: 4.5 Profile: 2 Swap behavior: 2 Buffer size (RGBA): 8,8,8,8 Stencil buffer: 8
 Profile: None (QOpenGLFunctions_4_5), Core (QOpenGLFunctions_4_5_Core), Compatibility (QOpenGLFunctions_4_5_Compatibility)
 
 
 Vulkan instance available
 Supported instance extensions:
 VK_KHR_surface, version 25
 VK_KHR_win32_surface, version 6
 VK_KHR_get_physical_device_properties2, version 1
 VK_EXT_debug_report, version 8
 Supported layers:
 VK_LAYER_VALVE_steam_overlay, version 1, spec version 1.0.3, Steam Overlay Layer
 VK_LAYER_LUNARG_standard_validation, version 1, spec version 1.0.51, LunarG Standard Validation Layer
 Available physical devices:
 API version 1.0.51, vendor 0x1002, device 0x6810, AMD Radeon R9 200 Series, type 2, driver version 1.6.0
 
 
 GPU:
 Card name: AMD Radeon R9 200 Series
 Driver Name: aticfx32.dll
 Driver Version: 22.19.677.257
 Vendor ID: 0x1002
 Device ID: 0x6810
 SubSys ID: 0x22721458
 Revision ID: 0x0000
 Plugin information:
 
 + Android 4.5.1
 + AutoTest 4.5.1
 AutotoolsProjectManager 4.5.1
 BareMetal 4.5.1
 + Bazaar 4.5.1
 + Beautifier 4.5.1
 + BinEditor 4.5.1
 + Bookmarks 4.5.1
 + CMakeProjectManager 4.5.1
 + CVS 4.5.1
 + ClangCodeModel 4.5.1
 + ClangStaticAnalyzer 4.5.1
 + ClassView 4.5.1
 ClearCase 4.5.1
 + CodePaster 4.5.1
 + Core 4.5.1
 + CppEditor 4.5.1
 + CppTools 4.5.1
 + Debugger 4.5.1
 + Designer 4.5.1
 + DiffEditor 4.5.1
 EmacsKeys 4.5.1
 + FakeVim 4.5.1
 + GLSLEditor 4.5.1
 + GenericProjectManager 4.5.1
 + Git 4.5.1
 HelloWorld 4.5.1
 + Help 4.5.1
 + ImageViewer 4.5.1
 Ios 4.5.1
 + Macros 4.5.1
 + Mercurial 4.5.1
 ModelEditor 4.5.1
 Nim 4.5.1
 + Perforce 4.5.1
 + ProjectExplorer 4.5.1
 + PythonEditor 4.5.1
 + QbsProjectManager 4.5.1
 + QmakeAndroidSupport 4.5.1
 + QmakeProjectManager 4.5.1
 + QmlDesigner 4.5.1
 + QmlJSEditor 4.5.1
 + QmlJSTools 4.5.1
 + QmlProfiler 4.5.1
 + QmlProjectManager 4.5.1
 + Qnx 4.5.1
 + QtSupport 4.5.1
 + RemoteLinux 4.5.1
 + ResourceEditor 4.5.1
 ScxmlEditor 4.5.1
 SilverSearcher 4.5.1
 + Subversion 4.5.1
 + TaskList 4.5.1
 + TextEditor 4.5.1
 Todo 4.5.1
 + UpdateInfo 4.5.1
 + Valgrind 4.5.1
 + VcsBase 4.5.1
 + Welcome 4.5.1
 + WinRt 4.5.1
 
 Qt Creator 4.5.1
 Based on Qt 5.10.1 (MSVC 2015, 32 bit)
 From revision 24cd0b1cd6
 Built on Feb 10 2018 04:20:25
 
 {noformat}
 {noformat} Qt 5.10.1 (i386-little_endian-ilp32 shared (dynamic) release build; by MSVC 2015) on "windows" OS: Windows 10 (10.0) [winnt version 10.0.16299] Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 RTM HLE Environment: QTDIR="C:\Qt\5.9.1\msvc2017_64" Features: QT_NO_EXCEPTIONS Library info: PrefixPath: C:\Qt\Tools\QtCreator\bin DocumentationPath: C:\Qt\Tools\QtCreator\bin\doc HeadersPath: C:\Qt\Tools\QtCreator\bin\include LibrariesPath: C:\Qt\Tools\QtCreator\bin LibraryExecutablesPath: C:\Qt\Tools\QtCreator\bin\bin BinariesPath: C:\Qt\Tools\QtCreator\bin PluginsPath: C:\Qt\Tools\QtCreator\bin\plugins ImportsPath: C:\Qt\Tools\QtCreator\bin\imports Qml2ImportsPath: C:\Qt\Tools\QtCreator\bin\qml ArchDataPath: C:\Qt\Tools\QtCreator\bin DataPath: C:\Qt\Tools\QtCreator\bin TranslationsPath: C:\Qt\Tools\QtCreator\bin\translations ExamplesPath: C:\Qt\Tools\QtCreator\bin\examples TestsPath: C:\Qt\Tools\QtCreator\bin\tests SettingsPath: Standard paths [*...* denote writable entry]: DesktopLocation: "Desktop" *C:\Users\Owner\Desktop* DocumentsLocation: "Documents" *C:\Users\Owner\Documents* FontsLocation: "Fonts" *C:\WINDOWS\Fonts* ApplicationsLocation: "Applications" *C:\Users\Owner\AppData\Roaming\Microsoft\Windows\Start Menu\Programs* MusicLocation: "Music" *C:\Users\Owner\Music* MoviesLocation: "Movies" *C:\Users\Owner\Videos* PicturesLocation: "Pictures" *C:\Users\Owner\Pictures* TempLocation: "Temporary Directory" *C:\Users\Owner\AppData\Local\Temp* HomeLocation: "Home" *C:\Users\Owner* AppLocalDataLocation: "Application Data" *C:\Users\Owner\AppData\Local\QtProject\qtdiag* C:\ProgramData\QtProject\qtdiag C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data C:\Qt\Tools\QtCreator\bin\data\QtProject\qtdiag CacheLocation: "Cache" *C:\Users\Owner\AppData\Local\QtProject\qtdiag\cache* GenericDataLocation: "Shared Data" *C:\Users\Owner\AppData\Local* C:\ProgramData C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data RuntimeLocation: "Runtime" *C:\Users\Owner* ConfigLocation: "Configuration" *C:\Users\Owner\AppData\Local\QtProject\qtdiag* C:\ProgramData\QtProject\qtdiag C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data C:\Qt\Tools\QtCreator\bin\data\QtProject\qtdiag DownloadLocation: "Download" *C:\Users\Owner\Downloads* GenericCacheLocation: "Shared Cache" *C:\Users\Owner\AppData\Local\cache* GenericConfigLocation: "Shared Configuration" *C:\Users\Owner\AppData\Local* C:\ProgramData C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data AppDataLocation: "Application Data" *C:\Users\Owner\AppData\Roaming\QtProject\qtdiag* C:\ProgramData\QtProject\qtdiag C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data C:\Qt\Tools\QtCreator\bin\data\QtProject\qtdiag AppConfigLocation: "Application Configuration" *C:\Users\Owner\AppData\Local\QtProject\qtdiag* C:\ProgramData\QtProject\qtdiag C:\Qt\Tools\QtCreator\bin C:\Qt\Tools\QtCreator\bin\data C:\Qt\Tools\QtCreator\bin\data\QtProject\qtdiag File selectors (increasing order of precedence): en_US windows winnt Network: Using "OpenSSL 1.0.2j 26 Sep 2016", version: 0x100020af Platform capabilities: ThreadedPixmaps OpenGL ThreadedOpenGL WindowMasks MultipleWindows ForeignWindows NonFullScreenWindows NativeWidgets WindowManagement RasterGLSurface AllGLFunctionsQueryable SwitchableWidgetComposition Style hints: mouseDoubleClickInterval: 500 mousePressAndHoldInterval: 800 startDragDistance: 10 startDragTime: 500 startDragVelocity: 0 keyboardInputInterval: 400 keyboardAutoRepeatRate: 32 cursorFlashTime: 1060 showIsFullScreen: 0 showIsMaximized: 0 passwordMaskDelay: 0 passwordMaskCharacter: U+25CF fontSmoothingGamma: 1 useRtlExtensions: 0 setFocusOnTouchRelease: 0 tabFocusBehavior: Qt::TabFocusBehavior(TabFocusAllControls) singleClickActivation: 0 Additional style hints (QPlatformIntegration): ReplayMousePressOutsidePopup: 1 Theme: Platforms requested : windows available : Styles requested : WindowsVista,Windows available : windowsvista,Windows,Fusion System font : "MS Shell Dlg 2" 8 Native file dialog Fonts: General font : "MS Shell Dlg 2" 8 Fixed font : "Courier New" 9 Title font : "MS Shell Dlg 2" 8 Smallest font: "MS Shell Dlg 2" 8 Palette: WindowText: #ff000000 Button: #fff0f0f0 Light: #ffffffff Midlight: #ffe3e3e3 Dark: #ffa0a0a0 Mid: #ffa0a0a0 Text: #ff000000 BrightText: #ffffffff ButtonText: #ff000000 Base: #ffffffff Window: #fff0f0f0 Shadow: #ff696969 Highlight: #ff0078d7 HighlightedText: #ffffffff Link: #ff0000ff LinkVisited: #ffff00ff AlternateBase: #ffe9e7e3 NoRole: #ff000000 ToolTipBase: #ffffffdc ToolTipText: #ff000000 Screens: 1, High DPI scaling: inactive # 0 "\\.\DISPLAY1" Depth: 32 Primary: yes Manufacturer: Model: Serial number: Geometry: 2560x1440+0+0 Available: 2560x1381+0+0 Physical size: 553x311 mm Refresh: 60 Hz Power state: 0 Physical DPI: 117.584,117.608 Logical DPI: 142,142 Subpixel_None DevicePixelRatio: 1 Pixel density: 1 Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0 Dynamic GL LibGL Vendor: ATI Technologies Inc. Renderer: AMD Radeon R9 200 Series Version: 4.5.13492 Compatibility Profile Context 22.19.677.257 Shading language: 4.50 Format: Version: 4.5 Profile: 2 Swap behavior: 2 Buffer size (RGBA): 8,8,8,8 Stencil buffer: 8 Profile: None (QOpenGLFunctions_4_5), Core (QOpenGLFunctions_4_5_Core), Compatibility (QOpenGLFunctions_4_5_Compatibility) Vulkan instance available Supported instance extensions: VK_KHR_surface, version 25 VK_KHR_win32_surface, version 6 VK_KHR_get_physical_device_properties2, version 1 VK_EXT_debug_report, version 8 Supported layers: VK_LAYER_VALVE_steam_overlay, version 1, spec version 1.0.3, Steam Overlay Layer VK_LAYER_LUNARG_standard_validation, version 1, spec version 1.0.51, LunarG Standard Validation Layer Available physical devices: API version 1.0.51, vendor 0x1002, device 0x6810, AMD Radeon R9 200 Series, type 2, driver version 1.6.0 GPU: Card name: AMD Radeon R9 200 Series Driver Name: aticfx32.dll Driver Version: 22.19.677.257 Vendor ID: 0x1002 Device ID: 0x6810 SubSys ID: 0x22721458 Revision ID: 0x0000 Plugin information: + Android 4.5.1 + AutoTest 4.5.1 AutotoolsProjectManager 4.5.1 BareMetal 4.5.1 + Bazaar 4.5.1 + Beautifier 4.5.1 + BinEditor 4.5.1 + Bookmarks 4.5.1 + CMakeProjectManager 4.5.1 + CVS 4.5.1 + ClangCodeModel 4.5.1 + ClangStaticAnalyzer 4.5.1 + ClassView 4.5.1 ClearCase 4.5.1 + CodePaster 4.5.1 + Core 4.5.1 + CppEditor 4.5.1 + CppTools 4.5.1 + Debugger 4.5.1 + Designer 4.5.1 + DiffEditor 4.5.1 EmacsKeys 4.5.1 + FakeVim 4.5.1 + GLSLEditor 4.5.1 + GenericProjectManager 4.5.1 + Git 4.5.1 HelloWorld 4.5.1 + Help 4.5.1 + ImageViewer 4.5.1 Ios 4.5.1 + Macros 4.5.1 + Mercurial 4.5.1 ModelEditor 4.5.1 Nim 4.5.1 + Perforce 4.5.1 + ProjectExplorer 4.5.1 + PythonEditor 4.5.1 + QbsProjectManager 4.5.1 + QmakeAndroidSupport 4.5.1 + QmakeProjectManager 4.5.1 + QmlDesigner 4.5.1 + QmlJSEditor 4.5.1 + QmlJSTools 4.5.1 + QmlProfiler 4.5.1 + QmlProjectManager 4.5.1 + Qnx 4.5.1 + QtSupport 4.5.1 + RemoteLinux 4.5.1 + ResourceEditor 4.5.1 ScxmlEditor 4.5.1 SilverSearcher 4.5.1 + Subversion 4.5.1 + TaskList 4.5.1 + TextEditor 4.5.1 Todo 4.5.1 + UpdateInfo 4.5.1 + Valgrind 4.5.1 + VcsBase 4.5.1 + Welcome 4.5.1 + WinRt 4.5.1 Qt Creator 4.5.1 Based on Qt 5.10.1 (MSVC 2015, 32 bit) From revision 24cd0b1cd6 Built on Feb 10 2018 04:20:25 {noformat}
I've been working on a project and I'm trying to organize my layouts to not be as verbose about specifying the margins and spacing of layouts. I find the default margins of "13" and spacing of "8" to be too big, and thus I like "4" for both. Inspecting my *.ui file, I noticed that even when I set all 4 margins to the same value, they are actually much more verbose and repeated 4 times. If I set only <property name="margin"> manually in the *.ui file, it works, but when I reopen it in the designer then it's immediately expanded back into 4 separate properties for left/top/right/bottom.
I also discovered, and would like to make use of <layoutdefault spacing="4" margin="4"/> but it only has an effect at runtime, and if my layouts specify no spacing or margins, Qt Designer will show me still "13" and "8" even though it is correctly the value "4" at runtime. Qt Designer has the same behavior with Tools->Form Editor->Preview (it uses the "13" margins and "8" spacing so layoutdefault has no effect there either). I'm reporting this because I feel it must be a regression as this has worked for me in previous Qt Creator versions. I don't understand why Qt Designer would show me the form ignoring the default layout spacing and margins I've explicitly set (from Tools->Form Editors->Form Settings...).
I found in the QLayout documentation that spacing is actually supposed to be inherited if not set:
http://doc.qt.io/qt-5/qlayout.html#spacing-prop
I found in the same QLayout docs that margins are supposed to be determined by the style:
http://doc.qt.io/qt-5/qlayout.html#contentsMargins
Steps to reproduce:
1) Create a new layout test project
2) Specify the default layout margins and spacing in the Form Settings (which adds <layoutdefault> to the *.ui file)
3) Add a child layout and other widgets with some child layouts to the form
4) Examine the child layout and widget margins/spacing using the Designer inspector (notice that they are not what you set in the Form Settings as the default)
5) Compile and run the project and notice that the form will have the margins and spacing you specified in the Form Settings.