Exam 4 Flashcards
What are the 5 main python GUI options?
Tkinter -> part of PSL
QT -> Very popular, works x-platform
Kivy -> mobile focus
wxWidgets -> works x-platform
GTK+ > works x-platform
What are the 4 components of the event paradigm?
1) Event Loop- built-in loop constantly running (waiting) but not consuming too many CPU cycles
2) Events/signals- interaction w/ user triggers an event
3) Event Handler- chunk of code that does something in response to an event
4) Registration- tie the function and event together
what is the main window for TKinter GUI?
Tk()
What does Tk.mainloop() do?
Launches the Gui and takes over thread
This Tkinter widget is a single line user text input field
Entry
What Tkinter widget is used to draw complex layouts and images?
Canvas
What TKinter widget acts as a container enabling grouping and organization of other widgets
Frame
What Tkinter widget is used for a single-line caption to another widget?
Label
What Tkinter widget is used to present a user with a list of options?
Listbox
What is the Tkinter dropdown menu widget used to generate a pop-up list of items within a selection?
OptionMenu
What Tkinter widget provides a multiline text field for user input?
Text
Tkinter widget for checkbox options list
CheckButton
What is the Tkinter radio button widget?
RadioButton
Tkinter widget for a graphical slider allowing for value selection from a range
Scale
what Tkinter widget acts a container for non-entry widgets
LabelFrame
widget allowing users to select from a range of values by toggling up or down arrows
Spinbox
widget allowing users to select from a range of values by toggling up or down arrows
Spinbox
What tk widget is a combination of an Entry widget and a Listbox widget?
Combobox - A combobox widget allows you to select one value in a set of values. In addition, it allows you to enter a custom value
What are the three Tkinter geometry/layout managers?
pack, grid, and place
this ttk widget allows you to select pages of contents by clicking tabs
Notebook
What Tkinter widget allows you to give feedback to user about the progress of a long-running task?
ttk.Progressbar
which TKinter widget should you use to display data in tabular or hierarchical structures?
ttk.Treeview
this Tkinter widget places a thin horizontal or vertical rule btwn widgets
ttk.Separator
Which Tkinter widgets have a command property and allow you to ‘Hook early’
Clickables- buttons, menu items, radio and check buttons
what is the general syntax for TKinter event binding?
widget.bind(“«name of the event»”, callback function)
What are the four Tkinter binding variables?
StringVar(), IntVar(), DoubleVar(), and BooleanVar()
syntax for changing text on a label in Tkinter
somelabel[‘text’] = ‘some new text’
what are the keywords of the Pack() geometry manager?
left, right, bottom, top
what are the keywords of the Grid() geometry manager?
N, S, E, W, NE, NW, SE, SW
how are widgets placed using the Place() geometry manager?
absolute (pixel) location
what Tkinter widget allows you to mix the three geometry managers within a single TK()?
Frame
what are the four main categories of TKinter dialogues
1) messagebox -> decision and no decision variants
2) simpledialog -> single value data entry
3) filedialog
4) colorchooser
what are the two GUI graphical designers for TKinter?
Pygubu and Page
what are the popular bindings for QT and Python?
QT Wiki, QtPy, PyQt4, PyQt5, Pyside, Pyside 2, Pyside 3 (only for Qt6)
What is QT Creator?
An IDE for C++ & QT development extended for QML and Python. Has debugging, code completion, app analysis/monitoring, console output, and project creation
The Qt5 base class for all UI objects?
QWidget
Qt5 checkbox with a text label
QCheckbox
Qt5 combined button and popup list widget
QComboBox
Qt5 Widget for editing just dates
QDateEdit
Qt5 widget for editing dates and times
QDateTimeEdit
Qt5 widget for editing just times
QTimeEdit
Qt5 rounded range control (think speedometer)
QDial
text or image display Qt5
QLabel
Qt5 one-line text editor
QLineEdit
menu widget for use in menu bars, context menus, and other popup menus
QMenu
Qt5 command button
QPushButton
Qt5 radio button with a text label
QRadioButton
Qt5 Scrolling view onto another widget
QScrollArea
Qt5 vertical or horizontal scrollbar
QScrollBar
Qt5 resize handle for resizing top-level windows
QSizeGrip
Column of tabbed widget items
QToolBox
Qt5 spinbox that takes doubles`
QDoubleSpinBox
Represents an anchor between two items in a QGraphicsAnchorLayout
QGraphicsAnchor
Layout where one can anchor widgets together in Graphics View
QGraphicsAnchorLayout
Lines up child widgets horizontally or vertically
QBoxLayout
Lines up widgets horizontally
QHBoxLayout
Lines up widgets vertically
QVBoxLayout
Manages forms of input widgets and their associated labels
QFormLayout
Lays out widgets in a grid
QGridLayout
the Qt5 base class of geometry managers
QLayout
Lays out widgets in a grid
QGridLayout
Abstract item that a QLayout manipulates
QLayoutItem
Blank space in a layout
QSpacerItem
Layout item that represents a widget
QWidgetItem
Qt5 Layout attribute describing horizontal and vertical resizing policy
QSizePolicy
Qt5 stack of widgets where only one widget is visible at a time
QStackedWidget and QStackedLayout
Qt5 container to organize groups of button widgets
QButtonGroup
Qt5 box frame with a title
QGroupBox
Model/view implementation Qt5 widget
QColumnView
Mapping btwn a section of a data model to widgets in Qt5
QDataWidgetMapper
Qt5 widget that provides a list or icon view onto a model.
QListView
Qt5 widget for default model/view implementation of a table view
QTableView
Qt5 widget for default model/view implementation of a tree view
QTreeView
Qt5 widget that dislpays the contents of a QUndoStack
QUndoView
Monthly based calendar widget allowing the user to select a date
QCalenderWidget
Qt5 container widget to organize groups of button widgets
QButtonGroup
Qt5 group box frame w/ a title
QGroupBox
Qt5 implementation of a splitter widget
QSplitter
Qt5 widget that handles functionality for the splitter
QSplitterHandle
Qt5 stack of tabbed widgets
QTabWidget
what are the key differences between Qt widgets, Qt Quick, and QML
Qt is the older, standalone UI builder designed for desktop applications and is built from C++. QML is a full programing language (user markup language based in javascript), while Qt quick is the framework for QML. Qt Quick and QML are meant to be used together.
what are the six Qt-quick positioners
1) Column -> positions its children in a column (vertically aligned…its wierd that’s not a typo)
2) Flow -> Positions its children side by side, wrapping as necessary
3) Grid -> Positions it’s children in grid formation
4) LayoutMirroring -> Property used to mirror layout behaviour
5) Positioner -> provides attached properties that contain details on where an item exists in a positioner
6) Row -> positions its children in a row (horizontally aligned…its wierd that’s not a typo)
what is the difference btwn Qt-quick positioners and layouts?
layouts have more resizing options
what are the five core areas of customization for material design?
Theme, Primary, Accent, Foreground, and Background
What are Qt views for and what are the three types?
Dealing with many.
Listview -> Provides a list view of items provided by a model
GridView -> For specifying a grid view of items provided by a model.
PathView -> Lays out model-provided items on a path (creates 3D relief / dimensionality)
what is the primary syntx of Dundar methods?
leading and trailing double underscores __someMethod__()