258bool QPlatformIntegration::hasCapability(Capability cap)
const
260 return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement
261 || cap == TopStackedNativeChildWindows || cap == WindowActivation
262 || cap == RhiBasedRendering || cap == ScreenWindowGrabbing;
385QVariant QPlatformIntegration::styleHint(StyleHint hint)
const
388 case CursorFlashTime:
389 return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime);
390 case KeyboardInputInterval:
391 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval);
392 case KeyboardAutoRepeatRate:
393 return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate);
394 case MouseDoubleClickInterval:
395 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval);
396 case StartDragDistance:
397 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance);
399 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime);
400 case ShowIsFullScreen:
402 case ShowIsMaximized:
404 case ShowShortcutsInContextMenus:
405 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ShowShortcutsInContextMenus);
406 case PasswordMaskDelay:
407 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
408 case PasswordMaskCharacter:
409 return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
410 case FontSmoothingGamma:
412 case StartDragVelocity:
413 return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
414 case UseRtlExtensions:
415 return QVariant(
false);
416 case SetFocusOnTouchRelease:
417 return QPlatformTheme::defaultThemeHint(QPlatformTheme::SetFocusOnTouchRelease);
418 case MousePressAndHoldInterval:
419 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
420 case TabFocusBehavior:
421 return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
422 case ReplayMousePressOutsidePopup:
424 case ItemViewActivateItemOnSingleClick:
425 return QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick);
427 return QPlatformTheme::defaultThemeHint(QPlatformTheme::UiEffects);
428 case WheelScrollLines:
429 return QPlatformTheme::defaultThemeHint(QPlatformTheme::WheelScrollLines);
430 case MouseQuickSelectionThreshold:
431 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseQuickSelectionThreshold);
432 case MouseDoubleClickDistance:
433 return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickDistance);
434 case FlickStartDistance:
435 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickStartDistance);
436 case FlickMaximumVelocity:
437 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickMaximumVelocity);
438 case FlickDeceleration:
439 return QPlatformTheme::defaultThemeHint(QPlatformTheme::FlickDeceleration);
440 case UnderlineShortcut:
447Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags)
const
450 if (flags & Qt::Popup & ~Qt::Window)
451 return Qt::WindowNoState;
453 if (flags & Qt::SubWindow)
454 return Qt::WindowNoState;
456 if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool())
457 return Qt::WindowFullScreen;
458 else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool())
459 return Qt::WindowMaximized;
461 return Qt::WindowNoState;