NavigationUser loginSpam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
Qt doubts in SargeI have got Sarge installed on my system. I have the following doubts:- (2) I want to add my qwt widgets also to the designer toolbox. how can I do that? (3) Where is the help available for the kde widgets? (qt widget help is ofcourse got through qt3-doc). It would be really useful. If anybody can guide I would appreciate it. |
some partial solution but still a problem
I have found the solution but problem is still not over.
The kde documents i got from kdesdk-doc-html and kdelibs4-doc packages.
I found out that the Makefile generated by qmake by default does not contain the following:-
(i) It does not contain the setting for the knuminput.h header which actually contains the kdoublespinbox class. (I erroneously thought the file would be called kdoublespinbox.h it is actually knuminput.h which i included in the main form's file). This I added as -I/usr/include/kde3 for the header file in INCPATH in the header
(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)
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?
some partial solution but still a problem
Check any pointers you may have - they're a common source of segfaults. To be safe, install 'gdb' or gdb and ddd and do not strip the binaries; then you can figure out exactly what goes wrong without much trouble.
strace output
I straced the program. Below is the final output's last portion:-
open("/etc/mtab", O_RDONLY) = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=239, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x412f3000
read(7, "/dev/hda10 / ext2 rw,errors=remo"..., 4096) = 239
close(7) = 0
munmap(0x412f3000, 4096) = 0
open("/proc/meminfo", O_RDONLY) = 7
fstat64(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x412f3000
read(7, "MemTotal: 256740 kB\nMemFre"..., 1024) = 572
close(7) = 0
munmap(0x412f3000, 4096) = 0
ioctl(5, FIONREAD, [1]) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
I can't make head or tail out of it.
And what do you mean by "Do not strip the binaries". I don't know how helpful gdb would be in this case since the program hardly opens!!
Hildebrand
gdb output
The gdb output is below for the above program. Can anybody suggest something. I can't understand it.
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb)
(gdb)
(gdb) start
Breakpoint 1 at 0x804b7ac: file main.cpp, line 6.
Starting program: /home/gajendra/test/testkdoublespinbox/testkdoublespinbox
[Thread debugging using libthread_db enabled]
[New Thread 1092003168 (LWP 3732)]
[Switching to Thread 1092003168 (LWP 3732)]
main (argc=1, argv=0x0) at main.cpp:6
6 QApplication a( argc, argv );
(gdb) next
5 {
(gdb) next
7 Form1 w;
(gdb)
6 QApplication a( argc, argv );
(gdb)
5 {
(gdb)
7 Form1 w;
(gdb)
6 QApplication a( argc, argv );
(gdb)
Session management error: Could not open network socket
7 Form1 w;
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0x40dbf92a in KLocale::doFormatInit () from /usr/lib/libkdecore.so.4
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Couldn't get registers: No such process.
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
Single stepping until exit from function _ZNK7KLocale12doFormatInitEv,
which has no line number information.
Cannot fetch general-purpose registers for thread 1092003168: generic error
(gdb)
problem sorted out
The problem got sorted out at qtcentre.org
The link for this is available at:
http://www.qtcentre.org/forum/f-kde-programming-7/t-kdeqwt-doubt-on-debian-sarge-6574-post35348.html#post35348
I hope it would be useful for others.