이 페이지에서

QBackingStore Class

QBackingStore 클래스는 QWindow 에 대한 그리기 영역을 제공합니다. 더 보기...

헤더: #include <QBackingStore>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui

공개 함수

QBackingStore(QWindow *window)
~QBackingStore()
void beginPaint(const QRegion &region)
void endPaint()
void flush(const QRegion &region, QWindow *window = nullptr, const QPoint &offset = QPoint())
QPlatformBackingStore *handle() const
bool hasStaticContents() const
QPaintDevice *paintDevice()
void resize(const QSize &size)
bool scroll(const QRegion &area, int dx, int dy)
void setStaticContents(const QRegion &region)
QSize size() const
QRegion staticContents() const
QWindow *window() const

상세 설명

QBackingStore는 ` QPainter `를 사용하여 `RasterSurface` 유형의 ` QWindow `에 그리기를 수행할 수 있게 해줍니다. ` QWindow `에 렌더링하는 또 다른 방법은 ` QOpenGLContext`를 사용하여 OpenGL을 활용하는 것입니다.

QBackStore는 창 내용의 버퍼화된 표현을 포함하므로, QPainter 를 사용하여 창 내용의 일부 영역만 업데이트함으로써 부분 업데이트를 지원합니다.

QBackingStore는 OpenGL 가속을 사용하지 않고, QWidget 또는 QGraphicsView UI 스택을 사용할 때 발생하는 추가 오버헤드 없이 QPainter 를 활용하려는 애플리케이션에서 사용될 수 있습니다. QBackingStore 사용 예제는 Raster Window 예제를 참조하십시오.

멤버 함수 문서

[explicit] QBackingStore::QBackingStore(QWindow *window)

지정된 최상위 window 에 대한 빈 표면을 생성합니다.

[noexcept] QBackingStore::~QBackingStore()

이 표면을 파괴합니다.

void QBackingStore::beginPaint(const QRegion &region)

지정된 ` region`의 백그라운드 스토어 표면에 그리기를 시작합니다.

paintDevice()를 사용하여 그리기 작업을 수행하기 전에 이 함수를 호출해야 합니다.

endPaint() 및 paintDevice()도 참조하십시오 .

void QBackingStore::endPaint()

그리기 작업을 종료합니다.

paintDevice()을 통한 그리기 작업이 끝난 후에 이 함수를 호출해야 합니다.

beginPaint() 및 paintDevice()도 참조하십시오 .

void QBackingStore::flush(const QRegion &region, QWindow *window = nullptr, const QPoint &offset = QPoint())

지정된 window 에 저장된 주어진 region 를 화면에 출력합니다.

window 는 이 백킹스토어(backingstore)가 나타내는 최상위 창이거나, 해당 창의 비일시적(non-transient) 자식 창이어야 합니다. nullptr 를 전달하면 백킹스토어의 최상위 창을 사용하는 것으로 대체됩니다.

window 가 자식 창인 경우, region 는 자식 창의 좌표계로 지정되어야 하며, offset 는 백킹스토어의 최상위 창을 기준으로 한 자식 창의 오프셋이어야 합니다.

endPaint()를 사용하여 그리기를 종료한 후에 이 함수를 호출해야 합니다.

QPlatformBackingStore *QBackingStore::handle() const

QPlatformBackingStore 구현체에 대한 포인터를 반환합니다.

bool QBackingStore::hasStaticContents() const

이 창에 정적 콘텐츠가 있는지 여부를 나타내는 부울 값을 반환합니다.

QPaintDevice *QBackingStore::paintDevice()

이 표면의 페인트 디바이스를 반환합니다.

경고: 이 디바이스는 ` beginPaint()`과 ` endPaint()` 호출 사이에서만 유효합니다. 반환된 값을 캐시해서는 안 됩니다.

void QBackingStore::resize(const QSize &size)

창 표면의 크기를 size 로 설정합니다.

size()도 참조하십시오 .

bool QBackingStore::scroll(const QRegion &area, int dx, int dy)

지정된 area 을 dx 픽셀만큼 오른쪽으로, dy 만큼 아래로 스크롤합니다. dx 과 dy 은 모두 음수일 수 있습니다.

영역이 성공적으로 스크롤된 경우 true 을 반환하고, 그렇지 않은 경우 false를 반환합니다.

void QBackingStore::setStaticContents(const QRegion &region)

region 를 이 창의 고정 콘텐츠로 설정합니다.

staticContents()도 참조하십시오 .

QSize QBackingStore::size() const

창 표면의 현재 크기를 반환합니다.

QRegion QBackingStore::staticContents() const

정적 콘텐츠가 포함된 창의 영역을 나타내는 ` QRegion ` 객체를 반환합니다.

setStaticContents()도 참조하십시오 .

QWindow *QBackingStore::window() const

이 서페이스와 연관된 최상위 창의 포인터를 반환합니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.