hi, My doubts are cleared now .But thanks sir regards
________________________________ From: Kevin Krammer <[email protected]> To: [email protected] Sent: Tuesday, 10 July 2012 2:03 PM Subject: Re: creating custom widget in qt On Monday, 2012-07-09, Daniel Kreuter wrote: > Hi, > > at first,please ask Qt related questions on [email protected] (see > the Mailing lists on www.qt-project.org for more information). No need, this is about a KDE application (and Season of KDE related) and KDE related development questions are what this list is here for. > Now to your question: > > To create a custom widget by subclassing QWidget like > > class MyCustomWidget : public QWidget > > and there you can place any method you need for your program. > When I understand your question of the xml right, you want to > display different images depending on the <img src> tag right? > For the XML things you can have a look at the Xml* classes on http://qt- > project.org/doc/qt-4.8/classes.html as well as the Qt XML Examples found > > http://qt-project.org/doc/qt-4.8/examples-xml.html on that page. Also KTuberling will have code that deals with loading its own file type, most likely parsing the information into some internal structures. Maybe those could be reused in your program, potentially moved into a library later on to be shared between your program and KTuberling. In either case I'd recommend separating the displaying/input of data from manipulating the XML, i.e. create a class that can do the manipulation and create a widget (e.g. in QtDesigner) that then interacts with this class (gets data from it, sets new data on it). Cheers, Kevin -- Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
