[Qt-interest] Data-driven delegates?
Jason H
scorp1us at yahoo.com
Tue Mar 15 15:25:03 CET 2011
I would like to make a small reporting utility for myself. The reporting utility
contains several SQL statements, each with a finite list of possible parameters.
I'd like to make an app that when I select the report to run, consults a
database (or config file) of the parameters in the SQL, along with their
delegate. For instance:
SELECT * FROM users WHERE lastLogin > :lastLogin ORDER BY username would be
expressed as
<report>
<sql>SELECT * FROM users WHERE {whereblock} ORDER BY username</sql>
<block="whereblock">
<param name="lastLogin" class="QDateTime" required="false" type="timestamp"
operator= ">" >
</params>
</report>
Then as I select the report from the list the GUI changes in the parameters
group box. I don't want to code the GUI into my app. A simple 3-column grid view
would be fine:
[ CheckBox1 : ParamName1 : Value]
[ CheckBox2 : ParamName2 : Value]
etc.
I've never had to do a dynamic UI in Qt before but it seems like there could be
some kind of delegate model or something which would make this easy?
Thanks.
More information about the Qt-interest-old
mailing list