I am trying to write a AbstractListView where items can either be text-only,
have a checkbox, or belong to a radiobutton group.
While I have succeeded in this, I'm having refresh issues with my
implementation, in regard to the radiobutton groups and the way that the
'exclusivity' is implemented. Basically, when one selects one of the
radiobuttons, and another button was selected previously, the new one IS
selected, yet the old one -appears- to still be selected, until one forces a
refresh via resizing the window. While the socket dataChanged() is called
for the item that was clicked, I can't easily see a way to do the same for
items that were programmatically unchecked. Full code is attached. Please
excuse the lame implementation for differentiating text items from checkbox
items and radiobutton items (namely, "x" or "o" to define checkboxes or
radiobuttons, in the text document provided).
Ideally, I'd like to find a way to generate QModelIndexes for the affected
items, and refresh each one as needed, but if there is a shotgun approach of
forcing a full refresh, that can be an option as well.

Based largely off of the SimpleTreeModel example.

-- 
~EntityReborn
xGetting Started                                xHow to familiarize yourself 
with Qt Designer
    oLaunching Designer                 oRunning the Qt Designer application
    oThe User Interface                 oHow to interact with Qt Designer

xDesigning a Component                  Creating a GUI for your application
    xCreating a Dialog                  How to create a dialog
    oComposing the Dialog               xPutting widgets into the dialog example
    oCreating a Layout                  xArranging widgets on a form
    Signal and Slot Connections         Making widget communicate with each 
other

Using a Component in Your Application   Generating code from forms
    The Direct Approach                 Using a form without any adjustments
    The Single Inheritance Approach     Subclassing a form's base class
    The Multiple Inheritance Approach   Subclassing the form itself
    Automatic Connections               Connecting widgets using a naming scheme
        A Dialog Without Auto-Connect   How to connect widgets without a naming 
scheme
        A Dialog With Auto-Connect      Using automatic connections

Form Editing Mode                       How to edit a form in Qt Designer
    Managing Forms                      Loading and saving forms
    Editing a Form                      Basic editing techniques
    The Property Editor                 Changing widget properties
    The Object Inspector                Examining the hierarchy of objects on a 
form
    Layouts                             Objects that arrange widgets on a form
        Applying and Breaking Layouts   Managing widgets in layouts 
        Horizontal and Vertical Layouts Standard row and column layouts
        The Grid Layout                 Arranging widgets in a matrix
    Previewing Forms                    Checking that the design works

Using Containers                        How to group widgets together
    General Features                    Common container features
    Frames                              QFrame
    Group Boxes                         QGroupBox
    Stacked Widgets                     QStackedWidget
    Tab Widgets                         QTabWidget
    Toolbox Widgets                     QToolBox

Connection Editing Mode                 Connecting widgets together with 
signals and slots
    Connecting Objects                  Making connections in Qt Designer
    Editing Connections                 Changing existing connections

Attachment: simpletreemodel2.py
Description: Binary data

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to