268bool QPlatformIntegration::hasCapability(Capability cap)
const
270 return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement
271 || cap == TopStackedNativeChildWindows || cap == WindowActivation
272 || cap == RhiBasedRendering || cap == ScreenWindowGrabbing;
395QVariant QPlatformIntegration::styleHint(StyleHint hint)
const
398 case CursorFlashTime:
399 return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime);
400 case KeyboardInputInterval:
401 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval);
402 case KeyboardAutoRepeatRate:
403 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate);
404 case MouseDoubleClickInterval:
405 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval);
406 case StartDragDistance:
407 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance);
409 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime);
410 case ShowIsFullScreen:
412 case ShowIsMaximized:
414 case ShowShortcutsInContextMenus:
415 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ShowShortcutsInContextMenus);
416 case PasswordMaskDelay:
417 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
418 case PasswordMaskCharacter:
419 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
420 case FontSmoothingGamma:
422 case StartDragVelocity:
423 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
424 case UseRtlExtensions:
425 return QVariant(
false);
426 case SetFocusOnTouchRelease:
427 return QPlatformTheme::defaultThemeHint(QPlatformTheme::SetFocusOnTouchRelease);
428 case MousePressAndHoldInterval:
429 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
430 case TabFocusBehavior:
431 return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
432 case ReplayMousePressOutsidePopup:
434 case ItemViewActivateItemOnSingleClick:
435 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick);
437 return QPlatformTheme::defaultThemeHint(QPlatformTheme::UiEffects);
438 case WheelScrollLines:
439 return QPlatformTheme::defaultThemeHint(QPlatformTheme::WheelScrollLines);
440 case MouseQuickSelectionThreshold:
441 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseQuickSelectionThreshold);
442 case MouseDoubleClickDistance:
443 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickDistance);
444 case FlickStartDistance:
445 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickStartDistance);
446 case FlickMaximumVelocity:
447 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickMaximumVelocity);
448 case FlickDeceleration:
449 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickDeceleration);
450 case UnderlineShortcut:
457Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags)
const
460 if (flags & Qt::Popup & ~Qt::Window)
461 return Qt::WindowNoState;
463 if (flags & Qt::SubWindow)
464 return Qt::WindowNoState;
466 if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool())
467 return Qt::WindowFullScreen;
468 else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool())
469 return Qt::WindowMaximized;
471 return Qt::WindowNoState;