본문 바로가기

QT and Symbian20

C++ Qt 06 - layouts, tabs and buddies Qt 레이아웃 하는 방법을 잊어 버리면 이 동영상을 다시 보길~ C++ Qt 06 - layouts, tabs and buddies 2015. 5. 29.
QFileSystemModel을 이용해서 Directory만 QTreeView에 표시하는 방법 http://doc.qt.io/qt-4.8/qt-itemviews-dirview-example.html 위의 예제를 이용하면 QFileSystemModel을 이용해서 간단하게 Dir view를 만들수 있다. 그러나 이미지를 봐서 알겠지만 Dir만 표시되지 않고 부가적인 것까지 표시가 된다. 그래서 간단하게 수정을 했다. class DirSystemModel : public QFileSystemModel { Q_OBJECT public: DirSystemModel(QObject *parent) : QFileSystemModel(parent) { this->setRootPath(""); this->setFilter(QDir::Dirs | QDir::NoDotAndDotDot); this->sort(0, Qt.. 2015. 5. 28.
SLOT에서 SIGNAL Widget 확인하는 방법 아주 간단하다. QObject *obj = sender(); slot 함수에서 QObject::sender() 함수를 이용하면 된다. 2015. 5. 28.
QImage Format 중 QImage::Format_Mono 처리 방식 참고자료: http://stackoverflow.com/questions/13754099/working-with-monochrome-qimage uchar * QImage::scanLine(int i) Returns a pointer to the pixel data at the scanline with index i. The first scanline is at index 0.The scanline data is aligned on a 32-bit boundary.Warning: If you are accessing 32-bpp image data, cast the returned pointer to QRgb* (QRgb has a 32-bit size) and use it to read/write th.. 2015. 1. 30.
QT에서 WinAPI SetFilePointer() 함수 대체 방법 QFile file(fileName); file.open(QFile::ReadOnly); QDataStream in(&file); .... qint64 oldPos = (in.device())->pos(); qint32 nSkipLen = 30; in.skipRawData(nSkipLen); //data를 skip하고 다시 이전 position으로 이동 (in.device())->seek(oldPos); //SetFilePointer()함수의 역활 .... 위와 같이 QDataStream 은 I/O device를 return하는 함수가 있다. QIODevice Class에는 Pos()와 Seek() 함수가 존재하는데 이 함수들을 이용하면 SetFilePointer()와 같은 방식을 구현할 수 있다. qi.. 2014. 12. 5.
QT 자료 검색중 찾은 블로그 1. http://kernelcoder.wordpress.com/ Ruler 개발을 할 때 자료를 찾다가 발견했다. 파일 탐색기 개발에도 도움이 될 것 같다. 2014. 11. 11.
QT 파일 읽고 쓰기 1. Read & Write QT에서 파일을 읽고 쓰기 위해서는 QFile과 QDataStream 클래스를 이용해서 처리할 수 있다. Text 같은 경우에는 QTextStream 이라는 클래스를 이용하면 편하다. 참고 자료는 역시 qt-project.org에서 제공하는 document를 보면 된다. http://qt-project.org/doc/qt-5/qfile.html 2. 주의 사항 : QDateStream을 이용해서 binary data를 읽을 때 주의해야 할 부분이 있다. QT는 default로 BigEndian을 사용한다. 그러나 Windows는 LittleEndian을 사용한다. 그러기 때문에 Windows에서 파일을 읽을 때에는 반듯이 setByteOrder() 함수 세팅을 해줘야 한다. .. 2014. 9. 24.
QT 참고 도서 및 SDK 설치 파일 1. QT 개발 참고도서 : C++ GUI Programming with Qt 4, Second Edition by Jasmin Blanchette; Mark Summerfield 위의 책만한 것이 없는 것 같다. 국내 여러 도서가 있지만 위의 책을 검색하면 pdf를 구할 수 있는데 그것을 읽어 보면 개발을 시작하는데 큰 어려움이 없을 것으로 판단된다. 국내 번역판도 있으니 영어가 어렵다면 번역본을 구해 보는 것도 좋다. 'Qt 4를 이용한 C++ GUI 프로그래밍' 2. 설치 파일 : http://qt-project.org/ 에서 설치 파일을 다운받을 수 있다. 일반적으로 MSVS에 Add-in를 설치해서 사용하는 것이 일반적일 것 같다. 현재(14년 9월) 최신 버전은 5.3.2이고 32bit와 64.. 2014. 9. 24.
5800 테마 홈스크린 아래 버튼 투명화 방법 SISContents 프로그램을 사용한다. Resources -> Pop-up Windows -> General Window Pop-up Window Healing(Top-Left part) 부터Pop-up Window Healing(Center)까지 Entry xxx.svgb 파일을 svg 파일로 변경한 후에 투명하게 만들고 Edit으로 파일을 변경해 주면 된다. 2010. 7. 27.
LIST