264bool QPlatformIntegration::hasCapability(Capability cap)
const
266 return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement
267 || cap == TopStackedNativeChildWindows || cap == WindowActivation
268 || cap == RhiBasedRendering || cap == ScreenWindowGrabbing;
391QVariant QPlatformIntegration::styleHint(StyleHint hint)
const
394 case CursorFlashTime:
395 return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime);
396 case KeyboardInputInterval:
397 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval);
398 case KeyboardAutoRepeatRate:
399 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate);
400 case MouseDoubleClickInterval:
401 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval);
402 case StartDragDistance:
403 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance);
405 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime);
406 case ShowIsFullScreen:
408 case ShowIsMaximized:
410 case ShowShortcutsInContextMenus:
411 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ShowShortcutsInContextMenus);
412 case PasswordMaskDelay:
413 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
414 case PasswordMaskCharacter:
415 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
416 case FontSmoothingGamma:
418 case StartDragVelocity:
419 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
420 case UseRtlExtensions:
421 return QVariant(
false);
422 case SetFocusOnTouchRelease:
423 return QPlatformTheme::defaultThemeHint(QPlatformTheme::SetFocusOnTouchRelease);
424 case MousePressAndHoldInterval:
425 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
426 case TabFocusBehavior:
427 return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
428 case ReplayMousePressOutsidePopup:
430 case ItemViewActivateItemOnSingleClick:
431 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick);
433 return QPlatformTheme::defaultThemeHint(QPlatformTheme::UiEffects);
434 case WheelScrollLines:
435 return QPlatformTheme::defaultThemeHint(QPlatformTheme::WheelScrollLines);
436 case MouseQuickSelectionThreshold:
437 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseQuickSelectionThreshold);
438 case MouseDoubleClickDistance:
439 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickDistance);
440 case FlickStartDistance:
441 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickStartDistance);
442 case FlickMaximumVelocity:
443 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickMaximumVelocity);
444 case FlickDeceleration:
445 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickDeceleration);
446 case UnderlineShortcut:
453Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags)
const
456 if (flags & Qt::Popup & ~Qt::Window)
457 return Qt::WindowNoState;
459 if (flags & Qt::SubWindow)
460 return Qt::WindowNoState;
462 if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool())
463 return Qt::WindowFullScreen;
464 else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool())
465 return Qt::WindowMaximized;
467 return Qt::WindowNoState;