'Programming/qt'에 해당되는 글 29건

  1. 2014.11.21 qt signal & slot - connect / disconnect / emit
  2. 2014.11.20 qt 프로젝트 파일 연관
  3. 2014.11.06 QT font 관련
  4. 2014.11.05 QT modules
  5. 2014.11.05 QT Quick UI 2
  6. 2014.09.20 qt moc(Meta Object Compiler)
  7. 2014.09.19 Qt 기본 encoding 설정
  8. 2014.09.19 qt 시그널 .. emit
  9. 2014.09.19 qt 설치 -_-a
Programming/qt2014. 11. 21. 10:17
음.. 일단 분석한 내용으로는..
signal은 껍데기 이고 Q_OBJECT를 본 moc가 알아서 생성해서
slot과 연결을 해주는 듯하다

아래 코드를 보면 signals: 에는 프로토타입만 있고 실제로 구현은 보이지 않으며
class Window : public QWidget
{
    Q_OBJECT
public:
    explicit Window(QWidget *parent = 0);
signals:
    void counterReached();
private slots:
    void slotButtonClicked(bool checked);
private:
    int m_counter;
    QPushButton *m_button;
}; 

connect를 보면 signal과 slot은 거의 동일한 함수 형태를 지니고
인자를 넘겨받게 되는 구조로 되어있다.
Window::Window(QWidget *parent) : QWidget(parent)
{
    // Set size of the window
    setFixedSize(100, 50);
 
    // Create and position the button
    m_button = new QPushButton("Hello World", this);
    m_button->setGeometry(10, 10, 80, 30);
    m_button->setCheckable(true);
 
    // Set the counter to 0
    m_counter = 0;
 
    connect(m_button, SIGNAL(clicked(bool)), this, SLOT(slotButtonClicked(bool)));
    connect(this, SIGNAL(counterReached()), QApplication::instance(), SLOT(quit()));
}
 
void Window::slotButtonClicked(bool checked)
{
    if (checked) {
        m_button->setText("Checked");
    } else {
        m_button->setText("Hello World");
    }
 
    m_counter ++;
    if (m_counter == 10) {
        emit counterReached();
    }
} 

아무튼.. 원칙(?)적으로는 각종 핸들러를 만들어주고 생성하고 연결해야 하나
그렇게 되면 코드가 막 꼬이는 것 처럼 보일수가 있기에
이를 간결하게 하기 위해서 moc를 통해 생성하는 구조로 추측된다.

[링크 : http://qt-project.org/doc/qt-4.8/tools-customtypesending.html]
[링크 : http://qt-project.org/wiki/Qt_for_beginners_Signals_and_slots]
[링크 : http://qt-project.org/wiki/Qt_for_beginners_Signals_and_slots_2]
[링크 : http://www.joinc.co.kr/modules/moniwiki/wiki.php/QT_Whitepaper]

'Programming > qt' 카테고리의 다른 글

Qt for Embedded Linux 와 VNC  (0) 2014.12.11
qt dialog / webkit 연동  (0) 2014.12.10
qt 프로젝트 파일 연관  (0) 2014.11.20
QT font 관련  (0) 2014.11.06
QT modules  (0) 2014.11.05
Posted by 구차니
Programming/qt2014. 11. 20. 13:44
.pro 파일은 프로젝트 파일

qmake을 통해
Makefile을 생성
그 이후 make로 컴파일 

즉, 프로젝트를 수정할일이 있다면 .pro 파일을 수정후
qmake를 통해서 Makefile을 다시 생성해 내도록 해야 한다.

*.pro -> qmake -> Makefile -> make 

[링크 : http://qt-project.org/doc/qt-4.8/qmake-project-files.html]
[링크 : http://qt-project.org/doc/qt-4.8/qmake-manual.html]
[링크 : http://qt-project.org/doc/qt-4.8/qmake-tutorial.html]

'Programming > qt' 카테고리의 다른 글

qt dialog / webkit 연동  (0) 2014.12.10
qt signal & slot - connect / disconnect / emit  (0) 2014.11.21
QT font 관련  (0) 2014.11.06
QT modules  (0) 2014.11.05
QT Quick UI  (2) 2014.11.05
Posted by 구차니
Programming/qt2014. 11. 6. 15:03
/usr/local/QtEmbedded-4.8.3/lib/fonts
*.ttf
*.qpf

[링크 : http://forum.falinux.com/zbxe/index.php?document_srl=498350&mid=graphic]



1. qt는 PFA/FPB BDF,TTF,qtf 폰트등을 지원합니다. 

2. qpf 폰트는 qt가 이들 bdf, ttf 폰트를 로드해서 rendering 이라는 절차를 거치는 과정에서 qpf라는 폰트를 나름대로 만들어서 사용을 하는 폰트입니다. qt쪽에서 보다 더 빠르게 만들어 놓은 format입니다. 
[링크 : http://www.korone.net/bbs/board.php?bo_table=qt_qna&wr_id=15069

umlaut

'Programming > qt' 카테고리의 다른 글

qt signal & slot - connect / disconnect / emit  (0) 2014.11.21
qt 프로젝트 파일 연관  (0) 2014.11.20
QT modules  (0) 2014.11.05
QT Quick UI  (2) 2014.11.05
qt moc(Meta Object Compiler)  (0) 2014.09.20
Posted by 구차니
Programming/qt2014. 11. 5. 16:20
java 에서는 package라고 하고
qt 에서는 module 이라고 하나보다

아무튼 module 이름으로 include 하면된다.
#include <Qtgui> 


Modules for general software development
QtCore Core non-graphical classes used by other modules
QtGui Graphical user interface (GUI) components
QtMultimedia Classes for low-level multimedia functionality
QtNetwork Classes for network programming
QtOpenGL OpenGL support classes
QtOpenVG OpenVG support classes
QtScript Classes for evaluating Qt Scripts
QtScriptTools Additional Qt Script components
QtSql Classes for database integration using SQL
QtSvg Classes for displaying the contents of SVG files
QtWebKit Classes for displaying and editing Web content
QtXml Classes for handling XML
QtXmlPatterns An XQuery & XPath engine for XML and custom data models
QtDeclarative An engine for declaratively building fluid user interfaces.
Phonon Multimedia framework classes
Qt3Support Qt 3 compatibility classes
Modules for working with Qt's tools
QtDesigner Classes for extending Qt Designer
QtUiTools Classes for handling Qt Designer forms in applications
QtHelp Classes for online help
QtTest Tool classes for unit testing
Modules for Windows developers
QAxContainer Extension for accessing ActiveX controls
QAxServer Extension for writing ActiveX servers
Modules for Unix developers
QtDBus Classes for Inter-Process Communication using the D-Bus

[링크 : http://qt-project.org/doc/qt-4.8/modules.html]

'Programming > qt' 카테고리의 다른 글

qt 프로젝트 파일 연관  (0) 2014.11.20
QT font 관련  (0) 2014.11.06
QT Quick UI  (2) 2014.11.05
qt moc(Meta Object Compiler)  (0) 2014.09.20
Qt 기본 encoding 설정  (0) 2014.09.19
Posted by 구차니
Programming/qt2014. 11. 5. 16:12
요약 : Quick UI는 qml 이라는 문서를 통해 GUI가 생성된다.


심심(?)해서 Qt Widgets Application 대신 QT Quick UI를 해서 프로젝트를 생성하니


QT Creator 에서 복사하니 이렇게 코드가 컬러풀 하게 붙여지네 ㄷㄷ

import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Window 2.2

ApplicationWindow {
    title: qsTr("Hello World")
    width: 640
    height: 480

    menuBar: MenuBar {
        Menu {
            title: qsTr("File")
            MenuItem {
                text: qsTr("&Open")
                onTriggered: console.log("Open action triggered");
            }
            MenuItem {
                text: qsTr("Exit")
                onTriggered: Qt.quit();
            }
        }
    }

    Button {
        text: qsTr("Hello World")
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
    }
}

이렇게 나온다 ㄷㄷ


'Programming > qt' 카테고리의 다른 글

QT font 관련  (0) 2014.11.06
QT modules  (0) 2014.11.05
qt moc(Meta Object Compiler)  (0) 2014.09.20
Qt 기본 encoding 설정  (0) 2014.09.19
qt 시그널 .. emit  (0) 2014.09.19
Posted by 구차니
Programming/qt2014. 9. 20. 21:42
qt의 c++ 확장인
signal등을 처리하는 비표준 부분을 처리해주는 녀석이 MOC 인거 같은데..
어떻게 보면 qt의 C++비표준 부분에 의해서 나노먼지 단위로 까이는 부분이 이 것 일려나?

[링크 : http://qt-project.org/doc/qt-5/moc.html]
[링크 : http://qt-project.org/doc/qt-5/metaobjects.htm]

'Programming > qt' 카테고리의 다른 글

QT modules  (0) 2014.11.05
QT Quick UI  (2) 2014.11.05
Qt 기본 encoding 설정  (0) 2014.09.19
qt 시그널 .. emit  (0) 2014.09.19
qt 설치 -_-a  (0) 2014.09.19
Posted by 구차니
Programming/qt2014. 9. 19. 17:57

Tools - Option - Text Editor - Behavior  - File Encodings


기본은 UTF-8인데 인코딩이 맞지 않을 경우 상단에 인코딩 바꾸라는 말이 나온다.
EUC-KR의 경우 windows-949로 설정하면 된다.

'Programming > qt' 카테고리의 다른 글

QT modules  (0) 2014.11.05
QT Quick UI  (2) 2014.11.05
qt moc(Meta Object Compiler)  (0) 2014.09.20
qt 시그널 .. emit  (0) 2014.09.19
qt 설치 -_-a  (0) 2014.09.19
Posted by 구차니
Programming/qt2014. 9. 19. 15:27
qt 프로젝트 소소를 뒤지다 보니 emit이라는게 나와 찾아보니
시그널 관련된 키워드라고 한다.
(게다가 c++이라 ctags는 헤매고 있고.. -_-)

[링크 : http://qt-project.org/doc/qt-4.8/signalsandslots.html]
[링크 : http://www.korone.net/bbs/board.php?bo_table=qt_qna&wr_id=14903
[링크 : http://woboq.com/blog/how-qt-signals-slots-work.html]


---
2014.11.12

[링크 : http://forum.falinux.com/zbxe/index.php?document_srl=406286&mid=graphic] 슬롯
[링크 : http://forum.falinux.com/zbxe/index.php?document_srl=406288&mid=graphic] 사용자 슬롯
[링크http://forum.falinux.com/zbxe/index.php?document_srl=406322&mid=graphic 시그널 & 슬롯
[링크 : http://www.korone.net/bbs/board.php?bo_table=qt_lecture&wr_id=475
[링크 : http://berabue.tistory.com/90]  

'Programming > qt' 카테고리의 다른 글

QT modules  (0) 2014.11.05
QT Quick UI  (2) 2014.11.05
qt moc(Meta Object Compiler)  (0) 2014.09.20
Qt 기본 encoding 설정  (0) 2014.09.19
qt 설치 -_-a  (0) 2014.09.19
Posted by 구차니
Programming/qt2014. 9. 19. 15:25
QT 개발환경은 여러가지가 있는데 아무래도 윈도우에서 하다 보니..
MinGW가 포함되어 있는 녀석을 골라야 하는데 헐... 737메가!! ㄷㄷㄷ
아무튼 이거 하나 깔면된다.

Source Components는 예제 파일.
음. 그런데 왜 Tools과 Qt양쪽에 MinGW가 포함되어 있는걸까?



Qt Online Installer for Linux 32-bit (23 MB) (Info)
Qt Online Installer for Linux 64-bit (22 MB) (Info)
Qt Online Installer for Mac (9.5 MB) (Info)
Qt Online Installer for Windows (14 MB) (Info)
Qt 5.3.2 for Android (Linux 32-bit, 518 MB) (Info)
Qt 5.3.2 for Android (Linux 64-bit, 517 MB) (Info)
Qt 5.3.2 for Android (Windows 32-bit, 817 MB) (Info)
Qt 5.3.2 for Linux 32-bit (449 MB) (Info)
Qt 5.3.2 for Linux 64-bit (447 MB) (Info)
Qt 5.3.2 for Mac (456 MB) (Info)
Qt 5.3.2 for iOS (Mac, 913 MB) (Info)
Qt 5.3.2 for Android (Mac, 517 MB) (Info)
Qt 5.3.2 for Android and iOS (Mac, 1.0 GB) (Info)
Qt 5.3.2 for Windows 32-bit (MinGW 4.8.2, OpenGL, 737 MB) (Info)
Qt 5.3.2 for Windows 32-bit (VS 2010, OpenGL, 539 MB) (Info)
Qt 5.3.2 for Windows 32-bit (VS 2012, OpenGL, 555 MB) (Info)
Qt 5.3.2 for Windows 32-bit (VS 2013, 561 MB) (Info)
Qt 5.3.2 for Windows 32-bit (VS 2013, OpenGL, 559 MB) (Info)
Qt 5.3.2 for Windows 64-bit (VS 2013, 575 MB) (Info)
Qt 5.3.2 for Windows 64-bit (VS 2013, OpenGL, 573 MB) (Info)
Qt 5.3.2 for Windows RT 32-bit (649 MB) (Info)

기본 다운로드인 온라인 설치 버전은 10MB 이지만
다운로드 속도가 풀 패키지 보다 받는게 느리므로 여러모로 풀 패키지가 유리하다.

[링크 : http://qt-project.org/downloads]

'Programming > qt' 카테고리의 다른 글

QT modules  (0) 2014.11.05
QT Quick UI  (2) 2014.11.05
qt moc(Meta Object Compiler)  (0) 2014.09.20
Qt 기본 encoding 설정  (0) 2014.09.19
qt 시그널 .. emit  (0) 2014.09.19
Posted by 구차니