qt and mysql

Chad R. Kittel vertigo at wi.rr.com
Fri Feb 27 17:47:20 GMT 2004


Dennis Veatch wrote:
> On Friday 27 February 2004 01:17 pm, Florin Braescu wrote:
> 
>>--- Dennis Veatch <dveatch at woh.rr.com> wrote:
>>
>>>Silly question.....
>>>
>>>when lining qt it wants mysql (optional), can this
>>>be changed to postgres? Or
>>>at least have the option of chosing postgres? Or
>>>will qt work with postgres?
>>>I know little (well nil) about how that works.
>>>
>>>--
>>
>>Hi Dennis,
>>
>>  Mysql is an optional depend for qt3. Unfortunately
>>there is no postgresql option. Mysql can be used by
>>qt3 for some internal data storage and retrieval. 
> 
> 
> I kind a figured it was mainly for QT. Unfortunate they and others sort of 
> lock in what databases to use. I can see their point but don't really agree 
> with it. I just didn't want to have multiple DB's on the machine.
> 
> If mysql had something like postgis I wouldn't whine so much. Which is my 
> interest in postgresql.
> 
> What sort of stuff does QT use mysql for?

 From my understanding it's a driver plugin to allow direct access to 
mysql in code.  That is, to be able to query mysql for results nativly 
in code.  Below is some text I pulled from some random website that 
talks about it...  this was just an 'I'm feeling lucky' google hit.

  Database support

One of the major new features in Qt 3.0 is the SQL module that provides 
multiplatform access to SQL databases, making database application 
programming with Qt seamless and portable. The API, built with standard 
SQL, is database-neutral and software development is independent of the 
underlying database.

A collection of tightly focused C++ classes are provided to give the 
programmer direct access to SQL databases. Developers can send raw SQL 
to the database server or have the Qt SQL classes generate SQL queries 
automatically. Drivers for Oracle, PostgreSQL, MySQL and ODBC are 
available and writing new drivers is straightforward.

Tying the results of SQL queries to GUI components is fully supported by 
Qt's SQL widgets. These classes include a tabular data widget (for 
spreadsheet-like data presentation with in-place editing), a form-based 
data browser (which provides data navigation and edit functions) and a 
form-based data viewer (which provides read-only forms). This framework 
can be extended by using custom field editors, allowing for example, a 
data table to use custom widgets for in-place editing. The SQL module 
fully supports Qt's signal/slots mechanism, making it easy for 
developers to include their own data validation and auditing code.

Qt Designer fully supports Qt's SQL module. All SQL widgets can be laid 
out within Qt Designer, and relationships can be established between 
controls visually. Many interactions can be defined purely in terms of 
Qt's signals/slots mechanism directly in Qt Designer.

- v3rt1g0


More information about the Lunar mailing list