Skip to content

Using QT Example Tabs

russ_hensel edited this page Jul 5, 2025 · 5 revisions
Table of Contents

Introduction

Finding and Running the Examples:

Finding the Example: The first tab in the application implements a key word search of the tabs. Key words include both the names ( an parts of names, QPushButton also has the key word button ) and often some function of the widget. A widget list may be used to insert a word into the key word search field.

More about the search
     ......
Search Results
     The results list is fairly intuitive but note that it also lists the module name of the tab,
      this is usually scrolled off to the right, out of sight.

      Clicking on a result opens the tab ( which also can be closed with the X on the tab )

The example tabs typically have 3 parts

A part with the widgets of interest where you can try interactions with the widgets.

A row(s) of buttons that "do" something with the widgets.

A message area that tells you something about what is going on.

You should also consider you ide debugger as part of your interface.

So you can, and should, plunk around with the widgets to get a feeling for their behaviors. After a bit of that try the buttons.

Each button is labeled with what we hope is a descriptive name for what it does and the name of the method in the tab that does what ever.

There are some buttons that are on every example:

<mutate-examine> 
    This button will in some way mutate and examine the widgets. The
    messages should at least hint at what has happened, but to really
    understand: read the code ( one of the mutate... methods )

<wat-inspect> 
    This button will bring up a gui version of the wat inspector.
    we will have a whole page on this at: [[Wat Inspector]]

<breakpoint-debug> 
    This button will call breakpoint() and break into the tab code in
     the tabs breakpoint method.  This is an easy way to find and read
     the module who's code you are running and if desired step through
     it.  If you do not know your way around your IDE's debugger, learning
     it would be useful.

Reading the Code ( and finding it ): Finding the code:

  • Use ...

  • Use the file/naming conventions ...

  • Use links in this wiki

           ... A shortcoming of this is the view is the way github presents
           the code, which you may or may-not like
    

    When you read the code it is useful to distinguish between 3 different types of code:

  • The infrastructure/framework/boiler plate code that just makes the app run. While this may be of interest to you it is not the point of a tab and should not distract you. Often this code is found in: ** init() ** inspect() ** breakpoint()

  • Use of widgets that are not the focus of the tab. To make a tab you need a variety of widgets. The ones in supporting roles should, again not be a distraction.

  • The code of interest, for widget reference tabs this is code related to the widget the tab is covering.

Screenshot

( note: keeping screenshot up to date is a task that still eludes us, hopefully this is close enough )
Alt text)

Clone this wiki locally