이 페이지에서

QWebViewSettings Class

브라우저 속성과 특성을 구성할 수 있습니다. 더 보기...

헤더: #include <QWebViewSettings>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebView)
target_link_libraries(mytarget PRIVATE Qt6::WebView)
qmake: QT += webview
다음부터: Qt 6.11부터

공개 타입

enum class WebAttribute { LocalStorageEnabled, JavaScriptEnabled, AllowFileAccess, LocalContentCanAccessFileUrls }

공개 함수

void setAttribute(QWebViewSettings::WebAttribute attribute, bool on)
bool testAttribute(QWebViewSettings::WebAttribute attribute) const

상세 설명

QWebViewSettings 객체를 사용하여 브라우저 속성과 JavaScript 지원, 파일 액세스, 로컬 스토리지 기능과 같은 일반 속성을 구성할 수 있습니다.

기본값은 각 플랫폼에서 설정된 대로 유지됩니다.

멤버 유형 문서

enum class QWebViewSettings::WebAttribute

이 열거형 유형은 웹 페이지에 대한 설정을 지정합니다:

상수값설명
QWebViewSettings::WebAttribute::LocalStorageEnabled0HTML 5 로컬 스토리지 기능에 대한 지원을 활성화합니다.
QWebViewSettings::WebAttribute::JavaScriptEnabled1JavaScript 프로그램의 실행을 허용합니다.
QWebViewSettings::WebAttribute::AllowFileAccess2WebView 가 파일 URL을 로드할 수 있도록 합니다.
QWebViewSettings::WebAttribute::LocalContentCanAccessFileUrls3로컬로 로드된 문서가 다른 로컬 URL에 액세스할 수 있도록 허용합니다.

멤버 함수 문서

void QWebViewSettings::setAttribute(QWebViewSettings::WebAttribute attribute, bool on)

on 의 값에 따라 지정된 attribute 기능을 활성화하거나 비활성화합니다.

bool QWebViewSettings::testAttribute(QWebViewSettings::WebAttribute attribute) const

attribute 가 활성화되어 있으면 ` true `를 반환하고, 그렇지 않으면 ` false`를 반환합니다.

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