Results 1 to 14 of 14

Thread: KDE/QWT doubt on debian sarge

  1. #1
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default KDE/QWT doubt on debian sarge

    I have got Debian Sarge installed on my system. I have the following doubts:-
    (1) I want to use kde widgets within qt3 designer. In particular i wanted to use the KDoubleSpinBox widget. I am not finding the relevant header file in /usr/include/kde which also i had to manually specify in the make file. Where are they? Do i need some other package to be installed to get the header file. Other kde widgets seem to be there. (some are missing like kintspinbox). My code refuses to compile here due to this. Any suggestions anybody? The widget works fine in preview though!!

    (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.

  2. #2
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    For your KDE issue, here are source files..not sure they are up to date though
    http://api.kde.org/3.4-api/kdeui/html/files.html

    EDIT : Here is the up-to-date link !
    http://api.kde.org/3.5-api/kdelibs-a...tml/files.html

    To include QWT widgets, you should browse Google, but the most simple would be to write
    your own Designer plugin for that purpose.
    Check the Qt4 Designer docs

    Guilugi.

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Quote Originally Posted by guilugi View Post
    To include QWT widgets, you should browse Google, but the most simple would be to write
    your own Designer plugin for that purpose.
    Check the Qt4 Designer docs
    Guilugi.
    Qwt comes with a designer plugin (Qt3 + Qt4). I don't use Debian myself, but I'm pretty sure, that all you have to do is to install the Debian packages. If you want to install Qwt from source code, the INSTALL file explains how to build and install the Qwt designer plugin.

    Uwe

  4. The following user says thank you to Uwe for this useful post:

    hildebrand (30th August 2013)

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Quote Originally Posted by hildebrand View Post
    I am not finding the relevant header file in /usr/include/kde which also i had to manually specify in the make file. Where are they? Do i need some other package to be installed to get the header file.
    Try looking for a package called kde-devel or kdelibs-devel.

  6. The following user says thank you to jacek for this useful post:

    hildebrand (30th August 2013)

  7. #5
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Debian Sarge has qt3.3 and designer installed.

    The kde-devel package is installed. Package of Qwt (libqwt-dev) is also installed but i don't see any plugin installed. (I had installed the kdesdk package along with libqt3-mt-dev and qt3-designer, qt3-doc etc to get my system ready for qt programming). Also funny thing, I went throug kde core api available somewhere in /usr/share/doc/kde (which is what i was looking for not the online version) and the classes nowhere mentions KDoubleSpinBox although it is mentioned in the kdialog.h header file also. I am not able to connect where is it available.
    I request anybody who has debian 3.3 installed to put the widget in a form and compile it. It doesn't work. And to begin with where is the class if it is not there in kde core. Preview works very fine in qte-designer but make fails. What is the mismatch?

    Awaiting an early reply
    Hildebrand Victor

  8. #6
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    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?

  9. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Quote Originally Posted by hildebrand View Post
    It does not contain the setting for the knuminput.h header which actually contains the kdoublespinbox class.
    You have to add "INCLUDEPATH += /usr/include/kde3 /usr/include/qwt" to your .pro file.

    Quote Originally Posted by hildebrand View Post
    qmake should have done this by default along with qt designer but somehow didn't do.
    Because you haven't told it to do it. Add "LIBS += -lkdeui -lqwt" to your .pro file.

    Quote Originally Posted by hildebrand View Post
    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?
    It might be caused by lack of KApplication instance, which you should create instead of QApplication.

  10. The following user says thank you to jacek for this useful post:

    hildebrand (30th August 2013)

  11. #8
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Quote Originally Posted by jacek View Post
    It might be caused by lack of KApplication instance, which you should create instead of QApplication.
    I tried putting KApplication instead of QApplication in the main.cpp file. Output says some initialisation needs to be done. Whats the format?

    I am also not completely convinced that this is the problem. I ran an strace of the said file and it seems to have got a signal at the end which terminated it. The last portion is shown below:-
    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 out whats this happening which caused the problem. whats this ioctl for ?

    Hildebrand

  12. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Quote Originally Posted by hildebrand View Post
    I tried putting KApplication instead of QApplication in the main.cpp file. Output says some initialisation needs to be done. Whats the format?
    See this: http://api.kde.org/3.5-api/kdelibs-a...dLineArgs.html

    Quote Originally Posted by hildebrand View Post
    I am also not completely convinced that this is the problem. I ran an strace of the said file and it seems to have got a signal at the end which terminated it.
    ...
    --- SIGSEGV (Segmentation fault) @ 0 (0) ---
    Strace only shows you system calls. A debugger might give more information, but probably it's caused by a null pointer (for example something might be trying to use unitialized KApp variable).

  13. #10
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    I ran gdb with this program. The result is as follows:-
    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)

    I cannot make any head or tail of it. I tried replacing the QApplication definition with KApplication but I got some Message about some init function not being defined.
    Can you offer some explanation from the gdb output?

  14. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Quote Originally Posted by hildebrand View Post
    I ran gdb with this program. The result is as follows:-
    [...]
    I cannot make any head or tail of it.
    Better try:
    (gdb) run
    ...
    Program received signal SIGSEGV, Segmentation fault.
    0x40dbf92a in KLocale::doFormatInit () from /usr/lib/libkdecore.so.4
    (gdb) bt
    Quote Originally Posted by hildebrand View Post
    Program received signal SIGSEGV, Segmentation fault.
    0x40dbf92a in KLocale::doFormatInit () from /usr/lib/libkdecore.so.4
    Again, this can be caused by lack of KApplication instance.

    Quote Originally Posted by hildebrand View Post
    I tried replacing the QApplication definition with KApplication but I got some Message about some init function not being defined.
    You mean this message:
    FAILURE (KCmdLineArgs):
    Application has not called KCmdLineArgs::init(...).
    Just as it says, your application didn't invoke KCmdLineArgs::init(). See the link in my previous post and check the attached files.
    Attached Files Attached Files

  15. The following user says thank you to jacek for this useful post:

    hildebrand (25th April 2007)

  16. #12
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Yes thats the message I was getting when I tried KApplication. I'll do as you say and get back. I think this is the problem.

  17. #13
    Join Date
    Apr 2007
    Posts
    16
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    I modified the main.cpp file to be similar to the one you sent. My code is now compiling and working!! Thanks a lot.
    As for the Qwt plugin, I knew that qwt4.2 is coming default with Debian Sarge. They do not seem to be bundling the plugin with the package. From the qwt website qwt.sourceforge.net I downloaded the source package for qwt4.2 which comes with plugin also within it. I compiled it and copied the libqwtplugin.so to the correct plugin location manually as root(make install was not copying it to correct location). Once I did that my qwt widgets now appear in qwt designer. Now I have to start using them!!

  18. #14
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: KDE/QWT doubt on debian sarge

    Quote Originally Posted by hildebrand View Post
    As for the Qwt plugin, I knew that qwt4.2 is coming default with Debian Sarge. They do not seem to be bundling the plugin with the package. From the qwt website qwt.sourceforge.net I downloaded the source package for qwt4.2 which comes with plugin also within it.
    Qwt 4.2 is several years old. You already build your own Qwt library, so consider to start with Qwt 5.0.x: it works with Qt 3.3 and Qt 4.

    Uwe

Similar Threads

  1. QT4 minimum requirements Debian GNU/Linux Sarge
    By Everall in forum Installation and Deployment
    Replies: 10
    Last Post: 21st February 2006, 13:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.