Files
RedBear-OS/local/recipes/qt/qtbase/source/tests/baseline/shared/qwidgetbaselinetest.h
T
vasilito 04b7641e85 config: add x11proto dependency for libxau and SDDM
- Add x11proto to redbear-full.toml package list
- libxau recipe updated with x11proto dependency and custom build script
- Fixes libxau build failure: 'Package xproto was not found'
2026-06-20 14:57:46 +03:00

49 lines
991 B
C++

// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#pragma once
#include <QObject>
#include <QImage>
#include <QJsonObject>
QT_BEGIN_NAMESPACE
class QWidget;
class QWidgetBaselineTest : public QObject
{
Q_OBJECT
public:
QWidgetBaselineTest();
void takeStandardSnapshots();
QWidget *testWindow() const { return window; }
void reportDebugRect(const QString &type, const QColor &color,
const QString &label, QRect widgetRect, const QWidget *widget, QPainter *painter);
protected:
virtual void doInit() {}
virtual void doCleanup() {}
protected slots:
void initTestCase();
void init();
void cleanup();
void cleanupTestCase();
protected:
void makeVisible();
QImage takeSnapshot();
QImage takeScreenSnapshot(const QRect& rect = QRect());
QJsonObject debugRects;
private:
QWidget *background = nullptr;
QWidget *window = nullptr;
};
QT_END_NAMESPACE