내용으로 건너뛰기
사용자 도구
로그인
사이트 도구
도구
문서 보기
이전 판
백링크
최근 바뀜
미디어 관리
사이트맵
로그인
최근 바뀜
미디어 관리
사이트맵
기술자료
작업공간
개인공간
사이트맵
추적:
kb:qscintilla
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== QScintilla ====== [[Scite]]의 그것! {{qscintilla_s.gif}} ====== 빌드 ====== QScintilla 2 + Qt 4.7.3 기준. 설치할 때 적어놓지를 않아서, 기억에 의거하여 기록해둔다. - 소스 배포폰을 다운로드받는다. - QT 정적 라이브러리 프로젝트를 생성한다. (QtInstallation을 마치면 생성할 수 있다.) - 배포폰 디렉토리 아래에 있는 include, lexers, lexlib, Qt4, src 안에 있는 h/cpp 파일들을 모두 프로젝트 디렉토리에다 복사한다. - 프로젝트에 h/cpp 파일들을 추가한다. - 빌드한다. ====== 참고 ====== === Syntax Highlighting 설정 === 적당한 렉서 헤더 include하고 에디트 객체에다 추가 <code cpp> #include <Qsci/QsciLexerYaml.h> ... edit->setLexer(new QsciLexerYAML); </code> ==== 자동 완성 설정 ==== <code cpp> #!cpp #include <Qsci/QsciApis.h> ... QStringList keywordList; keywordList << "hello" << "world"; ... void SetAutoCompletion(QsciScintilla* edit, const QStringList& keywordList) { QsciAPIs* apis = new QsciAPIs(edit->lexer()); for each (QString keyword in keywordList) apis->add(keyword); apis->prepare(); edit->setAutoCompletionThreshold(2); edit->setAutoCompletionSource(QsciScintilla::AcsAPIs); } </code> ==== 멀티 라인 자동 완성 문제 ==== 기본적으로 멀티 라인은 지원하지 않는다. 뭐 이유가 있어서 그렇게 했을 테지만, 어쨌든 지원하려면 소스를 고쳐야 가능하다. <code cpp> void ListBoxQt::GetValue(int n, char *value, int len) { ... while (slen-- && len--) { // excel96 2011.09.02 //if (trim_selection && *s == ' ') // break; *value++ = *s++; } ... } </code> === Gutter 설정 === <code cpp> QFont font; font.setFamily("Courier New"); edit->setMarginsFont(font); edit->setMarginWidth(0, QFontMetrics(font).width("0000") + 6); edit->setMarginLineNumbers(0, true); </code> ==== 한글 표시 문제 ==== <code cpp> edit->setUtf8(true); </code> ====== 링크 ====== * [[http://www.riverbankcomputing.co.uk/software/qscintilla/intro]] ---- * see also [[Qt]]
kb/qscintilla.txt
· 마지막으로 수정됨: 2014/11/11 15:01 저자
excel96
문서 도구
문서 보기
이전 판
백링크
맨 위로