259bool QPlatformIntegration::hasCapability(Capability cap)
const
261 return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement
262 || cap == TopStackedNativeChildWindows || cap == WindowActivation
263 || cap == RhiBasedRendering || cap == ScreenWindowGrabbing;
386QVariant QPlatformIntegration::styleHint(StyleHint hint)
const
389 case CursorFlashTime:
390 return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime);
391 case KeyboardInputInterval:
392 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval);
393 case KeyboardAutoRepeatRate:
394 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate);
395 case MouseDoubleClickInterval:
396 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval);
397 case StartDragDistance:
398 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance);
400 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime);
401 case ShowIsFullScreen:
403 case ShowIsMaximized:
405 case ShowShortcutsInContextMenus:
406 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ShowShortcutsInContextMenus);
407 case PasswordMaskDelay:
408 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
409 case PasswordMaskCharacter:
410 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
411 case FontSmoothingGamma:
413 case StartDragVelocity:
414 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
415 case UseRtlExtensions:
416 return QVariant(
false);
417 case SetFocusOnTouchRelease:
418 return QPlatformTheme::defaultThemeHint(QPlatformTheme::SetFocusOnTouchRelease);
419 case MousePressAndHoldInterval:
420 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
421 case TabFocusBehavior:
422 return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
423 case ReplayMousePressOutsidePopup:
425 case ItemViewActivateItemOnSingleClick:
426 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick);
428 return QPlatformTheme::defaultThemeHint(QPlatformTheme::UiEffects);
429 case WheelScrollLines:
430 return QPlatformTheme::defaultThemeHint(QPlatformTheme::WheelScrollLines);
431 case MouseQuickSelectionThreshold:
432 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseQuickSelectionThreshold);
433 case MouseDoubleClickDistance:
434 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickDistance);
435 case FlickStartDistance:
436 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickStartDistance);
437 case FlickMaximumVelocity:
438 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickMaximumVelocity);
439 case FlickDeceleration:
440 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickDeceleration);
441 case UnderlineShortcut:
448Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags)
const
451 if (flags & Qt::Popup & ~Qt::Window)
452 return Qt::WindowNoState;
454 if (flags & Qt::SubWindow)
455 return Qt::WindowNoState;
457 if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool())
458 return Qt::WindowFullScreen;
459 else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool())
460 return Qt::WindowMaximized;
462 return Qt::WindowNoState;