We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Qt to Libreoffice API / Howto

asked 2021-01-17 21:48:11 +0200

halkul gravatar image

updated 2021-01-18 10:02:08 +0200

PKG gravatar image

Hello, i ve written an small qt addressbook application (windows).

How can i insert the address data into libreoffice? Where can i find som information about that?

i thought following procedure: - Open Libreoffice template - Open Qt Addressbook Qt application - Insert from qt addressbook into libreoffice write (form fields)

i appreciate some hints, or links.

Thanks a lot for your help!

EDIT: Taken from answer and inserted here

Hello, it is more than an simple address book.

it reads the data from an sql database (with qt its very easy)

i try to write an address book application wit libreoffice macro, but the basic program style is not easy and there is not much docu about that.

-> i want to insert the data that qt displays into an new writer template thats open. i ve done it before with office word and activex


edit retag flag offensive close merge delete



"Addressbook Qt application" is the front end thing, but how does your application organize the data you have created using your application (does it store address data in csv format, some binary format, database format like sqlite,....?). From my perspective it does not make much sense to call the Qt front end from LibreOffice, but to directly connect to the data (which of course need to be accessible by any method provided by LibreOffice). Generally speaking: LibreOffice does that kind of thing via an registered database connection to the address data. Hence, opening an external application is more or less complicating things (if not eliminate functionality). See File -> Wizards -> Address Data Source... (you may be interested in option [o] Other external data source, which also might provide an understanding of available connection methods to your address data)

Opaque gravatar imageOpaque ( 2021-01-17 23:24:01 +0200 )edit

Regarding your additional info:

it reads the data from an sql database (with qt its very easy)

That's what I tried to tell: It is easy to connect to address book data using SQL with LibreOffice as well and for the purpose of creating form templates you should create an SQL connection directly to your address book data instead of trying to get out the data from your Qt application (which still could be used to manage your data).

Opaque gravatar imageOpaque ( 2021-01-18 09:45:12 +0200 )edit

Hello, it is also very easy in qt to connect to sql.

in libreoffice it is very hard to write an own gui. i tried it, but there is not much information about the programming language.

it is for me easier to write the app in qt and insert the text in writer.


halkul gravatar imagehalkul ( 2021-01-19 09:03:52 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-02-03 12:38:56 +0200

halkul gravatar image

Hello, after one more day of basic programming i wrote all guis with libreoffice. the beginning was very hard, but now its quite easy. thanks

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-01-17 21:48:11 +0200

Seen: 210 times

Last updated: Feb 03