SlideShare une entreprise Scribd logo
1  sur  32
Ch 6 Layout Management Author: Tony
Absolute Positioning ,[object Object]
Some text may be truncated ,[object Object]
Translate into another language ,[object Object]
The positions and sizes must be calculated manually
resizeEvent ,[object Object]
Layout Manager ,[object Object]
QVBoxLayout
QGridLayout
Margin & Spacing ,[object Object]
QLayout::setSpacing()
QGridLayout ,[object Object]
columnSpan = 1 ,[object Object],[object Object]
QSizePolicy
Preferred vs. Expanding ,[object Object]
Preferred  widgets stay at their size hint.
MinimumExpanding & Ignored ,[object Object]
Replaced by  ,[object Object]
Reimplement  minimumSizeHint()
Stretch Factor ,[object Object]
QSizePolicy::setVerticalStretch ( uchar stretchFactor )
QStackedLayout ,[object Object]
Pages ,[object Object]
Make a specific child widget visible ,[object Object]
An Example of Preferences Dialog QListWidget QStackedLayout
Splitters ,[object Object]
Contain other widgets
Automatically placed side by side in the order in which they are created
An Example of Splitters
An Example of The Mail Client's Splitter Layout
An Example of The Mail Client's Splitter Layout (cont.) ,[object Object]
Scrolling Areas ,[object Object]

Contenu connexe

Similaire à [C++ GUI Programming with Qt4] chap6

Qt for beginners part 2 widgets
Qt for beginners part 2   widgetsQt for beginners part 2   widgets
Qt for beginners part 2 widgetsICS
 
Abstract Window Toolkit
Abstract Window ToolkitAbstract Window Toolkit
Abstract Window ToolkitRutvaThakkar1
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWTbackdoor
 
Advanced Java programming
Advanced Java programmingAdvanced Java programming
Advanced Java programmingvanmathy1
 
Unit-1 awt advanced java programming
Unit-1 awt advanced java programmingUnit-1 awt advanced java programming
Unit-1 awt advanced java programmingAmol Gaikwad
 
The Ring programming language version 1.5.3 book - Part 80 of 184
The Ring programming language version 1.5.3 book - Part 80 of 184The Ring programming language version 1.5.3 book - Part 80 of 184
The Ring programming language version 1.5.3 book - Part 80 of 184Mahmoud Samir Fayed
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Javayht4ever
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01Ankit Dubey
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01JONDHLEPOLY
 
Layout managementand event handling
Layout managementand event handlingLayout managementand event handling
Layout managementand event handlingCharli Patel
 
Java Graphics
Java GraphicsJava Graphics
Java GraphicsShraddha
 
GWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouGWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouRobert Cooper
 
BLoC - Be Reactive in flutter
BLoC - Be Reactive in flutterBLoC - Be Reactive in flutter
BLoC - Be Reactive in flutterGiacomo Ranieri
 
CSE-4078 - Lecture - Week 3sasdgaga.pptx
CSE-4078 - Lecture - Week 3sasdgaga.pptxCSE-4078 - Lecture - Week 3sasdgaga.pptx
CSE-4078 - Lecture - Week 3sasdgaga.pptxzaidAhmad84
 
Drupal, GraphQL, Views, View Modes and Gatsby for a US Gov site CMS Philly
Drupal, GraphQL, Views, View Modes  and Gatsby for a US Gov site CMS PhillyDrupal, GraphQL, Views, View Modes  and Gatsby for a US Gov site CMS Philly
Drupal, GraphQL, Views, View Modes and Gatsby for a US Gov site CMS PhillyJesus Manuel Olivas
 

Similaire à [C++ GUI Programming with Qt4] chap6 (20)

swingbasics
swingbasicsswingbasics
swingbasics
 
Qt for beginners part 2 widgets
Qt for beginners part 2   widgetsQt for beginners part 2   widgets
Qt for beginners part 2 widgets
 
Abstract Window Toolkit
Abstract Window ToolkitAbstract Window Toolkit
Abstract Window Toolkit
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWT
 
Advanced Java programming
Advanced Java programmingAdvanced Java programming
Advanced Java programming
 
Unit-1 awt advanced java programming
Unit-1 awt advanced java programmingUnit-1 awt advanced java programming
Unit-1 awt advanced java programming
 
The Ring programming language version 1.5.3 book - Part 80 of 184
The Ring programming language version 1.5.3 book - Part 80 of 184The Ring programming language version 1.5.3 book - Part 80 of 184
The Ring programming language version 1.5.3 book - Part 80 of 184
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Java
 
L11cs2110sp13
L11cs2110sp13L11cs2110sp13
L11cs2110sp13
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
Layout managementand event handling
Layout managementand event handlingLayout managementand event handling
Layout managementand event handling
 
Custom components
Custom componentsCustom components
Custom components
 
Java Graphics
Java GraphicsJava Graphics
Java Graphics
 
GWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouGWT 2 Is Smarter Than You
GWT 2 Is Smarter Than You
 
BLoC - Be Reactive in flutter
BLoC - Be Reactive in flutterBLoC - Be Reactive in flutter
BLoC - Be Reactive in flutter
 
CSE-4078 - Lecture - Week 3sasdgaga.pptx
CSE-4078 - Lecture - Week 3sasdgaga.pptxCSE-4078 - Lecture - Week 3sasdgaga.pptx
CSE-4078 - Lecture - Week 3sasdgaga.pptx
 
Qt Programming on TI Processors
Qt Programming on TI ProcessorsQt Programming on TI Processors
Qt Programming on TI Processors
 
Swing
SwingSwing
Swing
 
Drupal, GraphQL, Views, View Modes and Gatsby for a US Gov site CMS Philly
Drupal, GraphQL, Views, View Modes  and Gatsby for a US Gov site CMS PhillyDrupal, GraphQL, Views, View Modes  and Gatsby for a US Gov site CMS Philly
Drupal, GraphQL, Views, View Modes and Gatsby for a US Gov site CMS Philly
 

Plus de Picker Weng

Introduction to Agile & Scrum
Introduction to Agile & ScrumIntroduction to Agile & Scrum
Introduction to Agile & ScrumPicker Weng
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxPicker Weng
 
Android Multimedia Framework
Android Multimedia FrameworkAndroid Multimedia Framework
Android Multimedia FrameworkPicker Weng
 
Tutorial for Installing eclox
Tutorial for Installing ecloxTutorial for Installing eclox
Tutorial for Installing ecloxPicker Weng
 
Chromium OS - User Accounts and Management
Chromium OS - User Accounts and ManagementChromium OS - User Accounts and Management
Chromium OS - User Accounts and ManagementPicker Weng
 
Android Camera Architecture
Android Camera ArchitectureAndroid Camera Architecture
Android Camera ArchitecturePicker Weng
 
OpenCV 2.2.0 for Android
OpenCV 2.2.0 for AndroidOpenCV 2.2.0 for Android
OpenCV 2.2.0 for AndroidPicker Weng
 
Vim+cscope+ctags+taglist
Vim+cscope+ctags+taglistVim+cscope+ctags+taglist
Vim+cscope+ctags+taglistPicker Weng
 

Plus de Picker Weng (9)

Introduction to Agile & Scrum
Introduction to Agile & ScrumIntroduction to Agile & Scrum
Introduction to Agile & Scrum
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on Linux
 
Android Multimedia Framework
Android Multimedia FrameworkAndroid Multimedia Framework
Android Multimedia Framework
 
Tutorial for Installing eclox
Tutorial for Installing ecloxTutorial for Installing eclox
Tutorial for Installing eclox
 
Chromium OS - User Accounts and Management
Chromium OS - User Accounts and ManagementChromium OS - User Accounts and Management
Chromium OS - User Accounts and Management
 
Android Camera Architecture
Android Camera ArchitectureAndroid Camera Architecture
Android Camera Architecture
 
OpenCV 2.2.0 for Android
OpenCV 2.2.0 for AndroidOpenCV 2.2.0 for Android
OpenCV 2.2.0 for Android
 
Uml
UmlUml
Uml
 
Vim+cscope+ctags+taglist
Vim+cscope+ctags+taglistVim+cscope+ctags+taglist
Vim+cscope+ctags+taglist
 

[C++ GUI Programming with Qt4] chap6