Recompiling QCAD 2. open source from QT3 to QT4

Drop in here to discuss whatever you want.

Moderator: andrew

Recompiling QCAD 2. open source from QT3 to QT4

Postby cytan299 » Thu Feb 11, 2010 4:02 pm

Hi,
Since the open source edition is based on QT3, has anyone tried to port it to QT4? What I'm think of is just using the qt3to4 tool and fixing anything else so that it will run in QT4. If it's not too big a deal, I'd try to do it. Of course, it some one else has already done this, it'll be great if I can download it.



Thanks!

cytan
cytan299
Newbie Member
 
Posts: 4
Joined: Thu Feb 11, 2010 2:18 pm

Got QCAD community source compiled in QT4 but ...

Postby cytan299 » Thu Feb 25, 2010 8:40 pm

Hi guys,
Well, I have the QCAD community source compiled, linked and running using QT4. HOWEVER, because of the changes which I needed to make its not behaving like it should yet. Time to yank out the debugger :-). See attached picture taken from my Mac. Left is the QT4 version of qcad and right is the QT3 version. Image

And don't hold your breath about when I can release this because this is done in my spare time only ...

If someone else has already done this port, it'll be great that they own up now so that I won't be wasting my time.

cytan
cytan299
Newbie Member
 
Posts: 4
Joined: Thu Feb 11, 2010 2:18 pm

Re: Got QCAD community source compiled in QT4 but ...

Postby janif » Sun Feb 28, 2010 9:56 pm

cytan299 wrote:If someone else has already done this port, it'll be great that they own up now so that I won't be wasting my time.


There are no working ports I'm aware of, but kad, especially kde4 version (kde port of qcad) might have some useful snippets.

http://git.tuxfamily.org/kad/kad?p=gitr ... heads/kde4
janif
Junior Member
 
Posts: 23
Joined: Sat Jan 19, 2008 7:28 pm

Thanks for the info

Postby cytan299 » Mon Mar 01, 2010 5:29 pm

Hi Janif,
Thanks for the info. But I believe KAD is still at QT3. Am I wrong?

cytan
cytan299
Newbie Member
 
Posts: 4
Joined: Thu Feb 11, 2010 2:18 pm

Postby allredb » Tue Apr 13, 2010 2:32 am

This has been on my mind lately as well. If you manage to complete this port I would love to have it. I use QCAD almost everyday for designing cabinets and furniture, I find the community edition does everything I need it to. But QT3 is ugly! I have actually done a bit of QT4 programming, though mostly with python. I would jump in and work on porting this as well but I have never ported anything and don't have much free time. Let me know what you come up with.
allredb
Registered Member
 
Posts: 1
Joined: Tue Apr 13, 2010 2:25 am

Postby HJarausch » Wed Apr 21, 2010 11:02 am

Just to add, the situation is even worse.
QT3 support has been dropped by upstream and is being phased out
by most Linux distributions.
Hopefully, some people from RibbonSoft gives a helping hand.

Helmut.
HJarausch
Registered Member
 
Posts: 1
Joined: Wed Apr 21, 2010 10:57 am

Postby kenr » Tue Apr 27, 2010 7:07 am

Relative to the qt3-4 port; I am having a problem getting the Cad Tools docking widget on the left of the main window to display. This is similar to the qt4 image in an earlier post by cytan299. See how his qt3 example has it displayed correctly.

Has anyone worked on this port enough to offer a suggestion?
kenr
Registered Member
 
Posts: 1
Joined: Tue Apr 27, 2010 6:37 am

compiling qcad for qt4

Postby boscaiolo » Tue Jun 08, 2010 11:16 am

Has anybody solved this issue yet?

I have been using qcad for over ten years. My most recent version was 2.1.2.8, but this had become cripplingly slow on my gentoo system -- I assume following the upgrade to qt4. I therefore purchased 2.2.2.0 (I try to purchase it from time to time to recompense Andrew and co. and I also hoped some of the inconsistent quirks would have been ironed out). However the new version is also too slow for useful work. Since it retains the quirky behaviour of the 2.1 series, I am happy to downgrade if only I can get a version that runs at normal speed.

As far as I can see on the website, the source is no longer available for the paid-for current version, but I assume the older versions' source is there somewhere, so that would be the route for me -- supposing I am likely to get a usable version now that qt4 is on my system.
boscaiolo
Newbie Member
 
Posts: 6
Joined: Tue Jun 08, 2010 11:01 am

Postby andrew » Tue Jun 08, 2010 6:57 pm

boscaiolo: most likely you are working with a standard graphics card driver that does not use all the memory your graphics card has. This can slow down things dramatically in recent versions of QCAD 2 since it uses double buffering. If you have an NVIDIA card, note that there are drivers available from NVIDIA for Linux.

PS: Please elaborate on the QCAD 2.2 behavior that you think is "quirky", thanks.
User avatar
andrew
Site Admin
 
Posts: 2568
Joined: Fri Mar 30, 2007 6:07 am

Postby boscaiolo » Tue Jun 08, 2010 7:24 pm

andrew wrote:boscaiolo: most likely you are working with a standard graphics card driver that does not use all the memory your graphics card has. This can slow down things dramatically in recent versions of QCAD 2 since it uses double buffering. ...


# lspci | grep -i graphics
00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
00:02.1 Display controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
# lsmod | grep intel
intel_agp 22900 1
agpgart 26620 3 drm,intel_agp

I am sure that qcad was functioning at normal speed a couple of weeks ago. I have updated various things in the interval, and am 90% sure that the change to qt4 happened during that update. Hence I attributed the slowdown to the qt version.

PS: Please elaborate on the QCAD 2.2 behavior that you think is "quirky", thanks.


The main alarming quirk was introduced after requests from users a few versions back. This is the persistent selection after a 'move'. Very often the object moved may be off-screen, so a subsequent attempt to delete elsewhere results in the loss of (sometimes large amounts of) data that is not obvious at the time, and may only be discovered days later. The persistent selection does not apply to the majority of edit actions. If it were universal, one would just get used to tapping 'tn' after every action, but when you do a series of, say, 10 manipulations in sequence and two of them happen to be 'move' it is not logical to have to treat these two differently. Far more rational would be to have a toggle to set persistent selection for those who prefer it, applying it to all edit actions. This would also be useful when one has to do a sequence of edits on one group of selections -- one could switch it on just for the duration of the manipulation.

I suspect that the other things that I see as quirky may be the result of limitations in the dxf format, and probably belong more on a wish-list that may not be able to be fulfilled.
boscaiolo
Newbie Member
 
Posts: 6
Joined: Tue Jun 08, 2010 11:01 am

recompiling with qt4

Postby boscaiolo » Wed Jun 09, 2010 6:13 pm

FWIW, I've tried to compile the community edition on my gentoo box with qt4, and, predictably enough, it failed. The errors seemed to start with "src/dl_writer.h:337: error: ‘strcasecmp’ was not declared in this scope" and a few similar, and arrived at "make: *** [src/dl_writer_ascii.o] Error 1
Building libdxf.a failed".

Is the new version going to be qt4?
boscaiolo
Newbie Member
 
Posts: 6
Joined: Tue Jun 08, 2010 11:01 am

Postby maqifrnswa » Sat Jul 31, 2010 5:20 pm

I found this project:
http://en.sourceforge.jp/projects/jw-qcad/

someone in Japan has ported the community edition to qt4.

Here's the source:
http://en.sourceforge.jp/cvs/view/jw-qcad/

I tried looking at the diff, but it was quite large. If someone is working on the port you can use this source code for guidance.

I haven't tried using it, just wanted to point it out.
maqifrnswa
Registered Member
 
Posts: 1
Joined: Sat Jul 31, 2010 5:15 pm

Postby qm » Sat Aug 28, 2010 9:44 am

I just compiled and ran the above mentioned Japanese port of qcad.
It is far from production quality, but works if you can get it to build.

I got the "cad-qt4" package from jww-qcad to build by these rough instructions:

1. Fix the reference to Python 2.5 in scripts and makefiles. I changed it to Python 2.6 which is what runs on my box.

2. Fix the references to $QTDIR/lib and $QTDIR/include in scripts and makefiles. I changed them to /usr/lib/qt4 and /usr/include/qt4 respectively.

3. Build jwwlib in its folder.

4. Enter the scripts folder and issue QTDIR=/usr/share/qt4/ ./build_qcad.sh notrans prof

Other notes:

* It requires QtCore, QtGui and QtAssistant from qt4.

* The makefiles or something seem sabotaged to not work without the "prof" option. It seems the source is configured to link against qcadprof even when the option is omitted.

* I'm on Gentoo, kde4 with no qt3.

* Maybe I forgot a fix or two that I performed robotically while trying this out.
qm
Registered Member
 
Posts: 1
Joined: Sat Aug 28, 2010 6:54 am

Postby anik1234 » Tue Oct 25, 2011 10:25 am

Without a change in the sources or Qt version it won't work. First please browse the documentation. Is there any version of Qt specified as required? If not, a code change is probably needed in your case. I understand you have no programming skills to fix it yourself? If the solution is not to use another Qt version, I'll download the source and make the change (but that's 5MB and it'll take me some time).
anik1234
 


Return to Chat

Who is online

Users browsing this forum: No registered users and 8 guests