Registered Member
|
guys,
i have a application that makes use of qtabwidget and I want to add a stripped version of kword to the last tab. I already have a QMainWindow with all the menu ( File,Edit,View) stuff for my application. I want a light version of kword with button bars. If someone has done this before or has a lot of experience and know how to do this, please do reply. I will put all the stuff that I'll run into in this thread. xyfix |
KDE Developer
|
Do you really want to use KWord or something like the rich textediting in KMail?
|
Registered Member
|
since my application is based on c++ and QT, I want something that is very close to this and koffice/kword looks perfect to me. I don't know wether KMail has multiple columns and other fancy features as kword has. But I hope that some of you professionals can help me with this.
|
Moderator
|
|
Registered Member
|
cyrille,
from the documentation ( http://api.kde.org/4.3-api/kdelibs-apid ... index.html ) I get that the mainwindow of my application should be derived from KParts::MainWindow instead of the current derivation from QMainWindow. Since the KPart/MainWindow delivers a skeleton that will be used by the KParts I can't use this ....right?? xyfix |
KDE Developer
|
Do you really want to integrate KOffice-Shapes and all these stuff?
|
Registered Member
|
You do not need to derive from KParts::MainWindow, just grab the part widget and use it in a QMainWindow.
connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
|
Registered Member
|
Ok,
I've been reading about kparts (I'm not finished yet) and it looks like something that I need in order to integrate kword (and some other kparts,e.g. kspread) into my application. Unfortunately it's a bit complex but I want to learn more about it. As I told before my application is based on Qt/c++, the mainwindow has a QTabWidget which currently opens tabs with an object that is derived from QTextEdit. I want to change this QTextEdit and replace it with kword (using as a kpart). The User, actually I don't need the Koffice-Shapes, but if it comes with the kword I'll accept it. My intention is to disable/remove some of the functionality of kword and keep only the necessary parts. |
KDE Developer
|
Why don't you just use kotext and flake libs to make your QTextEdit render ODF? It uses the normal QTextDocument, afterall.
Thomas Zander
KWord maintainer |
Registered Member
|
Zander,
will I then be able to support tables, spelling check, kspread, multicolumn text, etc..? |
Registered Member
|
Guys,
in this article http://developer.kde.org/documentation/ ... index.html it's written that in order to use a kpart inside my application and do some gui merging I need to define my gui in xml. That will need a whole lot of work, am I understanding it correctly or not ? In that same article it's written that:
But then I would have to derive my application main window from KTMainWindow as I stated above. Can somebody explain,because I just thought that I don't have to do that derivation. |
KDE Developer
|
No. You never stated what you wanted, so I just put out an idea. Seems you want KWord but not KWord. Oh, well. Bottom line is; you should experiment. Write code, try approaches. See what works.
Thomas Zander
KWord maintainer |
Registered Member
|
Zander,
my fault if I wasn't clear enough, I apologize. Can you please tell me wether the kpart approach suggested by cyrille the best way to go? I already have a application based on Qt with a QMainWindow and a QTabWidget on which I want the texteditor ( kword ) to appear. Currently all tabs of the QTabWidget presents an object that is derived from QTextEdit, not a high-end editor like KWord. I'm trying my best by coding and reading all kinds of articles on how to start but so far no success. |
Registered Member
|
Can somebody tell me wether I need to put the interface of my current app in a XML file like in the kparts if I want to use a kpart in my app? And does anybody have any experience in using a kpart( like kword) in their already existing app. I have tried to integrate kword into my app, but I'm encountering some problems. First of all I now derive my QMainWindow from KMainWindow and the class which used to be derived from QTextEdit is now derived from ReadWritePart. I'm not sure wether my approach will be successful, only a expert can tell me that in front.
|
Administrator
|
I do not think the merging of menus will work properly if you do not using KDE XMLGUI technology yourself. It is reasonably easy to port to however.
You need to derive from KXMLGUIWindow instead.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan