PDA

View Full Version : QDataWidgetMapper



rogerholmes
24th March 2009, 03:53
is there a complete explanation somewhere for how to use QDataWidgetMapper ?

i am trying to learn to use it by using examples from qt and can not figure it out. i am trying to do this in creator. is there an order that it must be listed?

this code
mapper = new QDataWidgetMapper(this);
causes error
invalid use of undefined type 'struct QDataWidgetMapper' in my.cpp

in my.h
class QDataWidgetMapper;

in class def
QDataWidgetMapper *mapper;

help....

ChrisW67
24th March 2009, 04:22
Have you read this issue of Qt Quarterly?
http://doc.trolltech.com/qq/qq21-datawidgetmapper.html

I'm currently trying to work this class out myself.

wysota
24th March 2009, 07:36
#include <QDataWidgetMapper> somewhere :)

rogerholmes
24th March 2009, 14:56
Thanks for your response, yes Chris that is the file i am using to suss this out. wysota that did work but it is not mentioned in the file Chris and i are looking at. I am brand new to QT i have several QT books but have not found one that describes the exact usage for each component that a TOTAL nubie (me) could use, do you know of something?

wysota
24th March 2009, 19:32
If you tell us what you don't know, we'll try to clear things out. There is a very simple example of using the mapper in its docs, is that not enough for you?