SlideShare a Scribd company logo
1 of 11
QML MANUAL - QML Type
By JHKim
Button 타입 : https://doc-snapshots.qt.io/qt5-dev/qml-qtquick-controls-button.h
Label 타입 : http://doc.qt.io/Qt-5/qml-qtquick-controls2-label.html
Row 타입 : https://doc-snapshots.qt.io/qt5-5.9/qml-qtquick-row.html
Column 타입 : https://doc-snapshots.qt.io/qt5-5.9/qml-qtquick-column.html
TextArea 타입 : http://doc.qt.io/Qt-5/qml-qtquick-controls2-textarea.html
TextField 타입 : http://doc.qt.io/Qt-5/qml-qtquick-controls2-textfield.html
Qt Quick Controls2 : http://doc.qt.io/Qt-5/qtquickcontrols2-index.html
QML 타입 목록 : http://doc.qt.io/Qt-5/qtquick-controls2-qmlmodule.html
구글 검색 창에 ‘qml <type name>’으로 검색
ex) qml button
qml label
qml row
qml column
# 참조 사이트
# 들어가기 전 - QML Types
• QML Types을 이용해서 View를 정의할 수 있음
• QML Types는 Qt Quick Controls 라이브러리를 import하여 사용
• Qt Quick Controls는 1.x와 2.x의 버전이 있으며, 2.x가 최신 버전
• 2.x는 일반적으로 1.x 버전 Types 성능을 개선하거나 기능을 확장
• 되도록 2.x Types를 이용하나, 어쩔 수 없는 상황에서는 1.x 버전을 사용
• Qt Quick Controls의 import 문장은 다음과 같음
import QtQuick.Controls 2.3
• 이상의 문장은 Qt 5.10 버전이며, 그 이하의 버전은 아래처럼 버전 Number를 따름
• 즉, Qt 5.9 버전이라면 import QtQuick.Controls 2.2와 같은 문장을 적용
# 들어가기 전 - QML Types
• 또한 2.x버전의 Controls를 사용하기 위해서는 아래처럼
*.pro파일에 ‘quickcontrols2’ 모듈을 입력
# 프로젝트 생성
Empty 프로젝트 생성
# 새 파일 생성
# Button 타입 생성
“main.qml’에 생성한 파일이름을 입
력하여 컴포넌트 생성
import QtQuick.Controls 1.4
Button { width: 100 height: 100 text: "BUTTON" }
데스크톱으로
빌드하면 나타나는 UI
# Label 타입 생성
Button 타입 주석처리하고,
Label 타입 생성
(주석처리 단축키는 Ctrl+/)
소스코드가 바로 적용 안 되는 경우에는 아래처럼 프로젝트 Clean 후 빌드
실행화면
# Row & Column 타입으로 정렬
실행화면
Row 타입을 이용하여 타입들을 수평 정렬할 수 있
음
실행화면
Row를 이용한 여러 버튼의 수평 정
렬
# Row & Column 타입으로 정렬
Column 타입을 이용하여 타입들을 수직 정렬할 수 있음
실행화면
Column을 이용한 여러 버튼의 수직 정
렬
# Text입력 타입
TextArea
• TextEdit을 상속
• multi line 텍스트 에디터로, TextEdit에는 없는 placeholder text 기능 가짐
TextField
• TextInput을 상속
• single line 텍스트 에디터로, TextInput에는 없는 placeholder text 기능을 가짐
실행화면

More Related Content

Recently uploaded

왜 학교에서의 스마트기기 활용이 학생의 대인관계에 영향을 미치는가? 조규복
왜 학교에서의 스마트기기 활용이 학생의 대인관계에 영향을 미치는가? 조규복왜 학교에서의 스마트기기 활용이 학생의 대인관계에 영향을 미치는가? 조규복
왜 학교에서의 스마트기기 활용이 학생의 대인관계에 영향을 미치는가? 조규복Kyubok Cho
 
2024_Puzners_work_introduction_slide_content
2024_Puzners_work_introduction_slide_content2024_Puzners_work_introduction_slide_content
2024_Puzners_work_introduction_slide_contentalskjde0129
 
2024_INU_graduation_presentation_data.pptx
2024_INU_graduation_presentation_data.pptx2024_INU_graduation_presentation_data.pptx
2024_INU_graduation_presentation_data.pptxssuser3a8816
 
D그룹 졸업작품 1번. 자연어 처리(NLP)를 이용한 인천대 챗봇
D그룹 졸업작품 1번. 자연어 처리(NLP)를 이용한  인천대 챗봇D그룹 졸업작품 1번. 자연어 처리(NLP)를 이용한  인천대 챗봇
D그룹 졸업작품 1번. 자연어 처리(NLP)를 이용한 인천대 챗봇hjk580018
 
현대 학교의 체육관 혁신 방향과 과제 그리고 사례들을 정리한 자료.pdf
현대 학교의 체육관 혁신 방향과 과제 그리고 사례들을 정리한 자료.pdf현대 학교의 체육관 혁신 방향과 과제 그리고 사례들을 정리한 자료.pdf
현대 학교의 체육관 혁신 방향과 과제 그리고 사례들을 정리한 자료.pdfSeongwon Kim
 
인천대학교 졸업작품 발표 피피티 - 축제 올인원(All-In-One)
인천대학교 졸업작품 발표 피피티 - 축제 올인원(All-In-One)인천대학교 졸업작품 발표 피피티 - 축제 올인원(All-In-One)
인천대학교 졸업작품 발표 피피티 - 축제 올인원(All-In-One)snsdl0905
 

Recently uploaded (6)

왜 학교에서의 스마트기기 활용이 학생의 대인관계에 영향을 미치는가? 조규복
왜 학교에서의 스마트기기 활용이 학생의 대인관계에 영향을 미치는가? 조규복왜 학교에서의 스마트기기 활용이 학생의 대인관계에 영향을 미치는가? 조규복
왜 학교에서의 스마트기기 활용이 학생의 대인관계에 영향을 미치는가? 조규복
 
2024_Puzners_work_introduction_slide_content
2024_Puzners_work_introduction_slide_content2024_Puzners_work_introduction_slide_content
2024_Puzners_work_introduction_slide_content
 
2024_INU_graduation_presentation_data.pptx
2024_INU_graduation_presentation_data.pptx2024_INU_graduation_presentation_data.pptx
2024_INU_graduation_presentation_data.pptx
 
D그룹 졸업작품 1번. 자연어 처리(NLP)를 이용한 인천대 챗봇
D그룹 졸업작품 1번. 자연어 처리(NLP)를 이용한  인천대 챗봇D그룹 졸업작품 1번. 자연어 처리(NLP)를 이용한  인천대 챗봇
D그룹 졸업작품 1번. 자연어 처리(NLP)를 이용한 인천대 챗봇
 
현대 학교의 체육관 혁신 방향과 과제 그리고 사례들을 정리한 자료.pdf
현대 학교의 체육관 혁신 방향과 과제 그리고 사례들을 정리한 자료.pdf현대 학교의 체육관 혁신 방향과 과제 그리고 사례들을 정리한 자료.pdf
현대 학교의 체육관 혁신 방향과 과제 그리고 사례들을 정리한 자료.pdf
 
인천대학교 졸업작품 발표 피피티 - 축제 올인원(All-In-One)
인천대학교 졸업작품 발표 피피티 - 축제 올인원(All-In-One)인천대학교 졸업작품 발표 피피티 - 축제 올인원(All-In-One)
인천대학교 졸업작품 발표 피피티 - 축제 올인원(All-In-One)
 

Featured

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

#002. qml types

  • 1. QML MANUAL - QML Type By JHKim
  • 2. Button 타입 : https://doc-snapshots.qt.io/qt5-dev/qml-qtquick-controls-button.h Label 타입 : http://doc.qt.io/Qt-5/qml-qtquick-controls2-label.html Row 타입 : https://doc-snapshots.qt.io/qt5-5.9/qml-qtquick-row.html Column 타입 : https://doc-snapshots.qt.io/qt5-5.9/qml-qtquick-column.html TextArea 타입 : http://doc.qt.io/Qt-5/qml-qtquick-controls2-textarea.html TextField 타입 : http://doc.qt.io/Qt-5/qml-qtquick-controls2-textfield.html Qt Quick Controls2 : http://doc.qt.io/Qt-5/qtquickcontrols2-index.html QML 타입 목록 : http://doc.qt.io/Qt-5/qtquick-controls2-qmlmodule.html 구글 검색 창에 ‘qml <type name>’으로 검색 ex) qml button qml label qml row qml column # 참조 사이트
  • 3. # 들어가기 전 - QML Types • QML Types을 이용해서 View를 정의할 수 있음 • QML Types는 Qt Quick Controls 라이브러리를 import하여 사용 • Qt Quick Controls는 1.x와 2.x의 버전이 있으며, 2.x가 최신 버전 • 2.x는 일반적으로 1.x 버전 Types 성능을 개선하거나 기능을 확장 • 되도록 2.x Types를 이용하나, 어쩔 수 없는 상황에서는 1.x 버전을 사용 • Qt Quick Controls의 import 문장은 다음과 같음 import QtQuick.Controls 2.3 • 이상의 문장은 Qt 5.10 버전이며, 그 이하의 버전은 아래처럼 버전 Number를 따름 • 즉, Qt 5.9 버전이라면 import QtQuick.Controls 2.2와 같은 문장을 적용
  • 4. # 들어가기 전 - QML Types • 또한 2.x버전의 Controls를 사용하기 위해서는 아래처럼 *.pro파일에 ‘quickcontrols2’ 모듈을 입력
  • 5. # 프로젝트 생성 Empty 프로젝트 생성
  • 6. # 새 파일 생성
  • 7. # Button 타입 생성 “main.qml’에 생성한 파일이름을 입 력하여 컴포넌트 생성 import QtQuick.Controls 1.4 Button { width: 100 height: 100 text: "BUTTON" } 데스크톱으로 빌드하면 나타나는 UI
  • 8. # Label 타입 생성 Button 타입 주석처리하고, Label 타입 생성 (주석처리 단축키는 Ctrl+/) 소스코드가 바로 적용 안 되는 경우에는 아래처럼 프로젝트 Clean 후 빌드 실행화면
  • 9. # Row & Column 타입으로 정렬 실행화면 Row 타입을 이용하여 타입들을 수평 정렬할 수 있 음 실행화면 Row를 이용한 여러 버튼의 수평 정 렬
  • 10. # Row & Column 타입으로 정렬 Column 타입을 이용하여 타입들을 수직 정렬할 수 있음 실행화면 Column을 이용한 여러 버튼의 수직 정 렬
  • 11. # Text입력 타입 TextArea • TextEdit을 상속 • multi line 텍스트 에디터로, TextEdit에는 없는 placeholder text 기능 가짐 TextField • TextInput을 상속 • single line 텍스트 에디터로, TextInput에는 없는 placeholder text 기능을 가짐 실행화면