[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: got some solution but still a problem



On Donnerstag, 19. April 2007 +0100, hildebrand_us wrote:

> (2) Since this class is part of the kdeui library I needed to include
> -lkdeui (qmake should have done this by default along with qt designer but
> somehow didn't do.) This has to be done everytime you call qmake(very
> boring thing to do!!). Then it compiles without problem. (The same problem
> was there with qwt also where I needed -I/usr/include/qwt and -lqwt to be
> put)

qmake can't know what libraries you are going to use. qmake just generates a 
platform specific makefile from the cross-platform project file.

Designer can't add this things either, the plugins do not contain this 
information, paths depend on where the libraries get installed.
Moreover, designer does not change the project file, since keeping any 
manually added information is quite a complex thing to do and the developer 
might not use qmake+project file at all (e.g. use cmake, automake, Visual 
Studio's build system, etc)

> But now what is my new problem, my code is now compiling. However, when I
> click on the KDoubleSpinBox icon to increment or decrement the count, It is
> exiting the program and shows me "Segmentation Fault" in Konsole. Why is
> this segmentation fault occuring? I noticed this does not occur for
> KNumInput also in the same header which I used. Can anyone give a pointer
> on why this is happening?

Sounds like your application does not have a KInstance instance (no pun).
Since floating point number visualization is dependent on the locale, e.g. 
some cuntries using comma as the decimal separator, the double num input 
widget accesses the global KInstance instance to retrieve the KLocale object.

Not having a KInstance object usually means the developer uses a QApplication 
in the main() function instead of using the KApplication object.
(Depending on the application's requirements it might be possible to just use 
KInstance+QApplication, but usually it is easier to just create a 
KApplication)

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

Attachment: pgplQ1UaJuXwj.pgp
Description: PGP signature


Reply to: