C++ Linux GUI programming?

Red Squirrel

No Lifer
May 24, 2003
70,084
13,533
126
www.anyf.ca
I can't find any CAD programs in Linux that are intuitive. They are all cubersome to use compared to AutoCAD. For example they don't allow you to type dimensions on the fly while you are dragging a line, or let you make multiple lines at once, or let you quickly select and move/copy chunks of lines etc.... they can all do these things but they require many more steps and are just really tedious to use. So.... I want to code my own CAD program. Sounds like a crazy undertaking and it probably is but I want to at least try. It won't have much in terms of advanced features like scripting or exporting in many different formats etc. I might just try to pick a format that is universal enough then I can always bring it to another CAD program if I need to do stuff that's more advanced. Like maybe VRML or something. As most programs should be able to import that.

So basically, what should I look into for learning how to code such an application? Essentially I want to make a rather standard GUI app that has a menu, tool bars, ability to print, save, open files using the distro's standard functionality for those things. (open dialogs, print dialogs etc). Can someone point me in right direction of what to read up on, any libraries/APIs to look into etc? A quick search points me towards QT, so I will probably read up further on that, but open to other suggestions.

I specified C++ in title, but really I'm willing to learn a new language if there is an easier route. Maybe Python?
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,103
126
Why not run Windows VM on Linux?

Anyway, Googled.

==


==


 
Last edited:

Cogman

Lifer
Sep 19, 2000
10,284
138
106
I think you are underestimating just how complex a piece of software AutoCAD is. If it were simple, it would have a lot more competition.

I'd suggest you start with a web app or an electron app (since the last thing you'll want in the beginning is to fight with platform incompatibility problems).

From there, if you need more capability and speed, you can always embed some WASM written in C/C++/Rust.
 

Red Squirrel

No Lifer
May 24, 2003
70,084
13,533
126
www.anyf.ca
I don't really want to deal with having to run stuff in a VM then that's just another machine to manage, a Windows one at that. That's what I do now, and I want to stop doing that, it's just cubbersome, especially dealing with file shares and permissions and all that crap. Whole point of running Linux is to get off Windows.

I probably would not jump straight to making a cad program but I at least want to learn how to make a program that has GUI functionality and then go from there. Like how to make lines show up on the screen or handle various mouse clicks and keys etc.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,610
4,530
75
I don't really want to deal with having to run stuff in a VM
You could try Autocad on Wine. Absolutely no guarantees, though.

I probably would not jump straight to making a cad program but I at least want to learn how to make a program that has GUI functionality and then go from there. Like how to make lines show up on the screen or handle various mouse clicks and keys etc.
I'd start with an existing CAD program and modify it; but I may like modifying other peoples' code more than most.

Some people say JavaScript is the future of all GUIs. So you might look at:

 

purbeast0

No Lifer
Sep 13, 2001
53,537
6,365
126
Not trying to be a dick, just realistic, but you are delusional if you think you can write a CAD program in your spare time on the side. My first 7 years out of college I worked on CAD software that was a direct competitor to AutoCAD, Vectorworks. There is simply no chance one person in their spare time will be able to do anything like that, especially if you have no experience doing anything close to that.
 
  • Like
Reactions: mxnerd