mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-04 16:25:27 +08:00
qt 6.5.1 original
This commit is contained in:
14
tests/manual/repaint/task141091/CMakeLists.txt
Normal file
14
tests/manual/repaint/task141091/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#####################################################################
|
||||
## task141091 Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_manual_test(task141091
|
||||
SOURCES
|
||||
main.cpp
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
28
tests/manual/repaint/task141091/main.cpp
Normal file
28
tests/manual/repaint/task141091/main.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QApplication>
|
||||
#include <QMainWindow>
|
||||
#include <QPaintEvent>
|
||||
#include <QDebug>
|
||||
|
||||
class MyWidget : public QWidget
|
||||
{
|
||||
public:
|
||||
MyWidget() : QWidget()
|
||||
{
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
setAttribute(Qt::WA_StaticContents);
|
||||
}
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e) { qDebug() << e->rect(); }
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MyWidget w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
3
tests/manual/repaint/task141091/task141091.pro
Normal file
3
tests/manual/repaint/task141091/task141091.pro
Normal file
@ -0,0 +1,3 @@
|
||||
CONFIG += console
|
||||
QT += widgets
|
||||
SOURCES += main.cpp
|
Reference in New Issue
Block a user