Re: KPasswordEdit problem
may we can see the code, which causes the segmentation fault?
Re: KPasswordEdit problem
Sure! I did not include it before because it is really very basic.
Anyway here is the related part of my code:
KPasswordEdit *passwd;
passwd=new KPasswordEdit(set_TR_IP_group,"Password");
passwd->setGeometry(QRect(58,94,106,20));
As you can see I just define it and set its geometry. I cannot figure out what is wrong with that.
Bye
Re: KPasswordEdit problem
Well that's not the code that producing the problem. It's probably how you use it with layouts etc. So just debug to see in which line the app crashes and post the code of that function. Than we can tell you more.
EDIT: Just recognize you don't use layouts... Anyway, debug to get the line.
Re: KPasswordEdit problem
Quote:
Originally Posted by
Lykurg
Well that's not the code that producing the problem. It's probably how you use it with layouts etc. So just debug to see in which line the app crashes and post the code of that function. Than we can tell you more.
EDIT: Just recognize you don't use layouts... Anyway, debug to get the line.
Well, it seems the line causing the crash is
passwd=new KPasswordEdit(set_TR_IP_group,"Password");
I really don't know why.
This is the gdb output:
Program received signal SIGSEGV, Segmentation fault.
[Switch to Thread -1229744432 (LWP 3786]
0xb706997d in KInstance::config() from /usr/lib/libkdecore.so.4
#0 0xb706997d in KInstance::config () from /usr/lib/libkdecore.so.4
#1 0xb7062ab2 in KGlobal::config () from /usr/lib/libkdecore.so.4
#2 0xb7e1a033 in KPasswordEdit::KPasswordEdit () from /usr/lib/libkdeui.so.4
#3 0x0805e0f2 in MulisAcq (this=0xbf985be2, parent=0x0, name=0x0,modal=false,fl=0) at .ui/mulis_acq.cpp:347
#4 0x0804ddde in main ()
The line 387 is the one I have indicated before.
Is it a KDE bug???
Any suggestions to implement a passwordedit in different way??
Thank you in advance.
Bye
Re: KPasswordEdit problem
Quote:
Originally Posted by
gd
Any suggestions to implement a passwordedit in different way??
QLineEdit with a proper QLineEdit::setEchoMode(), but it seems that your problem is in KInstance::config(). Where do you call that?
Re: KPasswordEdit problem
Quote:
Originally Posted by
Lykurg
Thank you! I have implemented the passwordedit using QLineEdit.
By the way I did not call KInstance explicitly in my code. Probably it is called internally when the KPasswordEdit is created.
Bye