QStyleFactory Class

QStyleFactory 클래스는 QStyle 개체를 생성합니다. 더 보기...

Header: #include <QStyleFactory>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets

정적 공개 멤버

QStyle *create(const QString &key)
QStringList keys()

상세 설명

QStyle 클래스는 GUI의 모양과 느낌을 캡슐화하는 추상 베이스 클래스입니다. QStyleFactory는 create() 함수와 스타일을 식별하는 키를 사용하여 QStyle 객체를 만듭니다. 스타일은 기본 제공되거나 스타일 플러그인에서 동적으로 로드됩니다( QStylePlugin 참조 ).

유효한 키는 keys() 함수를 사용하여 검색할 수 있습니다. 일반적으로 "windows"와 "fusion"이 포함됩니다. 플랫폼에 따라 "windowsvista" 및 "macos"를 사용할 수 있습니다. 키는 대소문자를 구분하지 않습니다.

QStyle참조하세요 .

멤버 함수 문서

[static] QStyle *QStyleFactory::create(const QString &key)

주어진 key 과 일치하는 QStyle 객체를 생성하여 반환하거나 일치하는 스타일을 찾을 수 없으면 nullptr 을 반환합니다.

기본 제공 스타일과 스타일 플러그인의 스타일 모두 일치하는 스타일이 있는지 쿼리됩니다.

참고: 사용된 키는 대소문자를 구분하지 않습니다.

keys()도 참조하세요 .

[static] QStringList QStyleFactory::keys()

유효한 키 목록, 즉 이 팩토리에서 스타일을 생성할 수 있는 키 목록을 반환합니다.

create()도 참조하세요 .

© 2025 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.