Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating a Qt Widget Based Application From Qt Creator Manual.

Similar presentations


Presentation on theme: "Creating a Qt Widget Based Application From Qt Creator Manual."— Presentation transcript:

1 Creating a Qt Widget Based Application From Qt Creator Manual

2 Overview Have had some experience with Qt –… messing with Creator … compiling … Next real step is to design and implementations of your own programs Follow the old maxim about programming: –If at all possible, don’t! Qt and such “frameworks” programs/systems are all about that –“Allow the user of our system to focus on the design …” vs. code Nonetheless, the complexity of such programs are not to be underestimated … especially, if it’s your first or second exposure to such large interacting systems –And ui programming is a paradigm example Will go explicitly through the steps of creating all files and a project Qt tutorials are pretty good

3 Qt Creator Manual Definitive source Only (formally published) place to get most recent information –Forums …. Forums Forums When open Qt Creator -> Help -> Contents

4 Qt Creator Manual General and specific information Tutorials

5 Creating a Qt Widget Based Application

6 Steps begin

7 Creating a Qt Widget Based Application Steps begin Summarized at right “One at a time

8 Creating the Project

9 Creating the Project - 1 Steps begin Choose which application type Qt Widgets application

10 Creating the Project – 1a, 2 Then, name and location of project

11 Creating the Project – 3 Then, will see things about “kits” (next slide)

12 Creating the Project – 4-6 Qt selects correct kits for you (based on your selection of project type) –“Kits” = classes, libraries, etc. Will have to specify “Base class” –Recall from discussion of class hierarchy Note: This where names of the several files are determined

13 Creating the Project – 7-8 So far, no real “project managemen t” to do Next, editor opens

14 Creating the Project – What is Created Files at right are created when “class name” specified to be “textfinder”

15 Creating the Project – What is Created Files created when “class name” specified to be “textfinder” These are the files you will work with and modify! Call them: –“boiler plate” –“shells” –…

16 Filling in the Missing Pieces

17

18 Specify User Interface Elements - 0 Qt calls the widgets the “User interface” –Which it is –BUT, there is no particular design included, except what inherent in Qt Will both create and design with Qt Creator Now have:.ui

19 Specify User Interface Elements – 1-2 Start Qt Designer and add widgets … Learn about Designer as you go …

20 Specify User Interface Elements – 3-6 Starting with above, get to at right Learn about Designer as you go … Tutorial mentions some things

21 Filling in the Missing Pieces

22 Header and Source Files – 9-10 Connect widget signals and slots (functions)

23 Qt Creator: Connecting Slots & Signals Can also use Qt Creator to connect signals and slots –From last assignment

24 Qt Creator: Connecting Slots & Signals E.g., as tutorial says … below, after right click on top button –and selecting “Got to slot” from context menu (context menu not shown

25 Qt Creator: Connecting Slots & Signals And there are other ways to connect signals and slots –Again, below, Qt Creator – from last assignment

26 Qt Creator: Connecting Slots & Signals Qt Creator – “Signals and Slots Editor” –Select tab

27 Qt Creator: Connecting Slots & Signals “Signals and Slots Editor” – click green “+” to add signal/slot pair –How know that? – read or try

28 Completing the Source File

29 Completing the Source File – Overview Add code elements to “shells”

30 Completing the Source File – 1-2

31 Completing the Source File – 3-4

32 Completing the Source File – 5

33 Creating a Resource File

34 Creating a Resource File - 1 Some projects will require yet one more file

35 Creating a Resource File – 1a-2 File locations

36 Creating a Resource File – 2-3 More file locations and integrate with project

37 Creating a Resource File – 4-7 Now, in ide …

38 Compiling and Running – old hat

39 … and run it, …………………….. In ide …

40 … and run it, then … next tutorial! In ide …

41 End.


Download ppt "Creating a Qt Widget Based Application From Qt Creator Manual."

Similar presentations


Ads by Google