273bool QPlatformIntegration::hasCapability(Capability cap)
const
275 return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement
276 || cap == TopStackedNativeChildWindows || cap == WindowActivation
277 || cap == RhiBasedRendering || cap == ScreenWindowGrabbing;
400QVariant QPlatformIntegration::styleHint(StyleHint hint)
const
403 case CursorFlashTime:
404 return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime);
405 case KeyboardInputInterval:
406 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval);
407 case KeyboardAutoRepeatRate:
408 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate);
409 case MouseDoubleClickInterval:
410 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval);
411 case StartDragDistance:
412 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance);
414 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime);
415 case ShowIsFullScreen:
417 case ShowIsMaximized:
419 case ShowShortcutsInContextMenus:
420 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ShowShortcutsInContextMenus);
421 case PasswordMaskDelay:
422 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
423 case PasswordMaskCharacter:
424 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
425 case FontSmoothingGamma:
427 case StartDragVelocity:
428 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
429 case UseRtlExtensions:
430 return QVariant(
false);
431 case SetFocusOnTouchRelease:
432 return QPlatformTheme::defaultThemeHint(QPlatformTheme::SetFocusOnTouchRelease);
433 case MousePressAndHoldInterval:
434 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
435 case TabFocusBehavior:
436 return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
437 case ReplayMousePressOutsidePopup:
439 case ItemViewActivateItemOnSingleClick:
440 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick);
442 return QPlatformTheme::defaultThemeHint(QPlatformTheme::UiEffects);
443 case WheelScrollLines:
444 return QPlatformTheme::defaultThemeHint(QPlatformTheme::WheelScrollLines);
445 case MouseQuickSelectionThreshold:
446 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseQuickSelectionThreshold);
447 case MouseDoubleClickDistance:
448 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickDistance);
449 case FlickStartDistance:
450 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickStartDistance);
451 case FlickMaximumVelocity:
452 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickMaximumVelocity);
453 case FlickDeceleration:
454 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickDeceleration);
455 case UnderlineShortcut:
462Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags)
const
465 if (flags & Qt::Popup & ~Qt::Window)
466 return Qt::WindowNoState;
468 if (flags & Qt::SubWindow)
469 return Qt::WindowNoState;
471 if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool())
472 return Qt::WindowFullScreen;
473 else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool())
474 return Qt::WindowMaximized;
476 return Qt::WindowNoState;