본문 바로가기

Qt

QApplication

https://doc.qt.io/qt-5/qapplication.html

 

QApplication Class | Qt Widgets 5.13.1

QApplication Class The QApplication class manages the GUI application's control flow and main settings. More... Header: #include qmake: QT += widgets Inherits: QGuiApplication Properties Public Functions Reimplemented Public Functions virtual bool notify(Q

doc.qt.io

1. QWidget 기반 애플리케이션에 필요한 일부 기능을 갖춘 QGuiApplication  specializes(전문화) 한다.

2. 위젯의 specific initialization(초기화), finalization(종료화)을 다룸

3. Qt를 사용하는 GUI 응용 프로그램에는 정확히 하나의 QApplication 객체가 있다.

4.  QWidget 기반이 아닌 Qt 애플리케이션의 경우 QtWidget 라이브러리 에 의존하지 않으므로 QGuiApplication을 대신 사용 해야 한다.

5. The QApplication object is accessible through the instance() function that returns a pointer equivalent to the global qApp pointer.

6. QApplication 의 주요 책임 영역은 다음과 같다 :

  • 팔레트 (), 글꼴 () 및 doubleClickInterval ()  같은 사용자의 데스크탑 설정으로 응용 프로그램을 초기화합니다 . 사용자가 일종의 제어판을 통해 데스크톱을 전체적으로 변경하는 경우 이러한 속성을 추적합니다.
  • 이벤트 처리를 수행합니다. 즉, 기본 윈도우 시스템에서 이벤트를 수신하여 관련 위젯으로 디스패치합니다. 사용하여 sendEvent ()와 postEvent를 () 당신은 위젯에 자신의 이벤트를 보낼 수 있습니다.
  • 일반적인 명령 줄 인수를 구문 분석하고 그에 따라 내부 상태를 설정합니다. 자세한 내용은 아래 생성자 설명서 를 참조하십시오.
  • QStyle 객체에 캡슐화 된 응용 프로그램의 모양과 느낌을 정의 합니다. setStyle ()을 사용 하여 런타임에 변경할 수 있습니다 .
  • 응용 프로그램이 색상을 할당하는 방법을 지정합니다. 자세한 내용은 setColorSpec ()을 참조하십시오.
  • translate () 를 통해 사용자에게 표시되는 문자열의 현지화를 제공합니다 .
  • 바탕 화면 () 및 클립 보드 ()  같은 마술 같은 물건을 제공합니다 .
  • 응용 프로그램의 창에 대해 알고 있습니다. widgetAt ()를 사용하여 특정 위치에있는 위젯을 묻거나 topLevelWidgets () 및 closeAllWindows () 목록을 가져올 수 있습니다 .
  • 응용 프로그램의 마우스 커서 처리를 관리합니다. setOverrideCursor ()를 참조하십시오.

7. 이것 외에도 QApplication 객체가 많은 초기화를 수행한다.

8. QApplication은 사용자 인터페이스와 관련된 다른 객체가 생성되기 전에 생성돼야 한다.

Groups of functions

System settings desktopSettingsAware(), setDesktopSettingsAware(), cursorFlashTime(), setCursorFlashTime(), doubleClickInterval(), setDoubleClickInterval(), setKeyboardInputInterval(), wheelScrollLines(), setWheelScrollLines(), palette(), setPalette(), font(), setFont(), fontMetrics().
Event handling exec(), processEvents(), exit(), quit(). sendEvent(), postEvent(), sendPostedEvents(), removePostedEvents(), hasPendingEvents(), notify().
GUI Styles style(), setStyle().
Color usage colorSpec(), setColorSpec().
Text handling installTranslator(), removeTranslator() translate().
Widgets allWidgets(), topLevelWidgets(), desktop(), activePopupWidget(), activeModalWidget(), clipboard(), focusWidget(), activeWindow(), widgetAt().
Advanced cursor handling overrideCursor(), setOverrideCursor(), restoreOverrideCursor().
Miscellaneous closeAllWindows(), startingUp(), closingDown().

See also QCoreApplication, QAbstractEventDispatcher, QEventLoop, and QSettings.

 

'Qt' 카테고리의 다른 글

QT  (0) 2019.12.22
int QApplication::exec()  (0) 2019.10.06