Registered Member
|
Hi all,
I am writing a console app in Qt for KDE. However I need credentials for a service. For this I want to use KWallet. While I can use the openWallet function if my class is derived from QDialog, I can't use it when I derive from QObject because I can't use the winId() function. What would be the proper way of doing this? Do I just have to derive from QDialog (QWidget) and don't use the show() function? Or is there another way to use Kwallets openWallet function with deriving from QObject instead? Thanks in advance! |
Administrator
|
According to the API documentation of KWallet::Wallet, it should be possible to do this.
Please see http://api.kde.org/4.8-api/kdelibs-apid ... 7568854a28 In short, just pass 0 instead of a proper window ID.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
First of all thank you for helping me out!
I tried with a 0 and with a WId type of variable as well (as that is what winId() returns). I uploaded a small part of the code that is relevant: http://pastebin.com/sDyNStMU http://pastebin.com/eTmsKpdx I get the following while running make:
So this might be a CMakeLists.txt file issue?
I really hope you can spot the issue! |
Registered Member
|
Just for clarity adding another body...
I fixed it! I was just thinking about that it is a linker error so probably an issue with the librarie settings in the CMakeLists.txt I compared with another KDE project and changed the last line:
Probably I can make this shorter but it might give someone else a clue! Thanks again! |
Administrator
|
Looks like you might have an include problem. Do you have the KWallet libraries included into your source code file?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Note that I marked the topic as solved;) It was indeed a libraries include issue Thanks anyway for checking out my thread! |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient