SQL widgets in QT4-designer?



  • Hi-

    I'm new to Qt and I'm trying to build a application (in Python) that will pull data from a MySQL DB. I'm trying to use Qt4 Designer to build a form where I will have a table populated from the DB. Looking at Qt3 docs, it seems that I could have dropped a widget like QDataTable onto my form, but this has changed in Qt4 and I can't figure out how to proceed. Some docs have pointed me to using QDataWidgetMapper, but I can't find this in Qt4 Designer?? When I search for help I find nice tutorials to do what I want, but only using Qt3.

    Note that I'm not using Qt Creator, rather I'm using Qt Designer from within eric4.

    Thanks for any help!

    -Jeff Taylor



  • Hi Jeff,

    I'm quite new to Qt as well, but I am currently working on a very similar project.
    It seems the most straightforward approach is to populate a QTableView widget, row by row.

    Take a look at the SQL Browser tutorial included in Qt 4.7 or "here":http://doc.qt.nokia.com/4.7-snapshot/demos-sqlbrowser.html

    Best of luck,

    Tim



  • Thanks Tim, I'll try that approach.

    -Jef


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.