[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

C++ gui

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 91
Thread images: 17

File: c++.png (23KB, 360x405px) Image search: [Google]
c++.png
23KB, 360x405px
I want make programs with interface's in C++, how i can do it?
>>
>>62467707
1. Write program in C++
2. Compile
3. ??????
4. Profit
>>
>>62467707
Qt
>>
Gtk
>>
>>62467721
>>62467728
which is better?
>>
>>62467707

Make the GUI in Electron and then use WebAssembly to embed your C++ into the Electron app.
>>
>>62467738
Neither. GUI's are for homosexual glow in the dark cia niggers
>>
>>62467738
QT uber massive better.
>>
>>62467747
this
>>
The problem here is your question is a bit too broad.
C++ doesn't have anything built into it to make a GUI with out doing most of the leg work your self.
If you are looking to make a Windows GUI then Visual Studio installs C++ with Microsofts's GUI libraries. Visual Studio also has a lot of built in functionality that allows you to visually deign your window.
Beyond that there are a million other ways of making a GUI in C++, all depending on what you are making it for.
>>
Use bare openGl
>>
>>62467738
Qt is the shit. Never seen better documentation in my life.
>>
>>62467707
recently found noesisgui
http://www.noesisengine.com
basically use blend to create wpf xaml files and you can use it in C++
>>
>>62467721
>>62467728
neither can compare to motif tho
>>
>>62467707

Qt is good, but it imposes GPL/LGPL obligations. Also, its a very big framework with several constraints which you need to be aware of.
GTKmm is fine on Linux but sucks everywhere else (Win32 backend still GDI)
WxWidgets is fine because it uses native controls, but it has bad tooling.
IUP is lightweight solution (You can even use Lua or LED), but you need to code by hand)
Nana uses modern C++ (C++14 afaik) but still poor in widgets
Libui is abandoned
Other solutions like Agar, CEGUI or Juce... But they are very specific.

C++ isn't oriented for RAD applications. Languages like Java are better here.
>>
>>62467721
>>62467728

dont fell in this fucking memes, let C++ for the critical parts, and wrap an html+js page inside a webkit container.
>>
>>62468024
>Qt is the shit. Never seen better documentation in my life.
actually its much better documented than M$ visual shit, idk why pajeets continues using that shity .NET frameworks.
>>
>>62469302

> dont fell in this fucking memes, let C++ for the critical parts, and wrap an html+js page inside a webkit container.

this is why i support genocide
>>
>>62469316
Note that I said 'the shit' not 'shit'.

Qt is the shit.
>>
Qt. It's cross-platform, fully-featured, and has good collaboration with the community. GTK sucks anywhere other than Linux, and even on Linux too to be honest. WPF is pretty good on Windows, but that's a .NET thing and you're using C++.
>>
>>62469396

Qt still have cringe problems

> Lack of native controls
> Meh deploy (QT Lite is getting better, but still meh)
> QTL (It's annoying have all stuff duplicated... QString, QList...)
> LGPL licensing (Fucking poison)
> MOC
> Critical bugs (I can't upgrade 3 of 5 applications because regressions)
>>
>>62467721
This is the correct answer.
>>62467728
For C++, this is an incorrect answer.
>>62467759
This is true, but doesn't really answer OP's question.

>>62469302
>>62468112
>>62467747
These are bait.
>>
does qt support any non-shit language yet? I mean anything that's not c++ and has decent static type checking (so no python either)
>>
LUA

Just copy paste from the awesome windows manager.

https://github.com/awesomeWM/awesome
>>
File: elv1s_awesome.png (1MB, 3842x1080px) Image search: [Google]
elv1s_awesome.png
1MB, 3842x1080px
>>62470364
>>62467707
Check out pic related for the coolest lua gui.

>https://github.com/Elv13/radical
>>
>>62470393
Aren't LUA guis just images?
>>
>>62470393
awesome is bretty gud, but aren't you concerned that in a year or two they'll release a new version without backwards compatibility and all your hard configuration work will be null and void?

That's what keeps me from spending much time to configure software in fancy ways.
>>
>>62471217
What is that supposed to mean?
>>
I'd use Windows forms
>>
>>62467707
Step 1. Learn C++
Step 2. Forget everything you learned in step 1 and learn how to use a GUI library
>>
>>62471515
C++ guis are special hard code assembly pixels represented in memory by hexadecimal pointers.
>>
File: additive_particle_scripting.jpg (31KB, 600x166px) Image search: [Google]
additive_particle_scripting.jpg
31KB, 600x166px
>>62471515
He's talking about atual matrix theory. Quarks, gluons, and other bosons (including the higgs) are simply the computer code running on the last layer of the matrix which we interact with. Furthermore each sequence of bosons can be a script for something else to save memory for deeper matricies. For example (quark, gluon, mason) is the code for the strong nuclear force. Just as (quark quark, gluon) is the script for the electromagnetic weak force. You can understand this by thinking of squares, triangles, and spheres. Each single shape can represent a shape itself or when you add them together they can form more complex shapes, kinda like voxels.

Just go ask sci they can explain it better.
>>
>>62471934
Oh yes, that makes a lot of sense now. Thank you for explaining!
>>
>>62468286
>Qt is good, but it imposes GPL/LGPL obligations.
What are LGPL obligations, exactly?

>Also, its a very big framework with several constraints which you need to be aware of.
Can you give some examples? Personally, the thing that annoys me most is the lack of template support in the MOC.
>>
>>62471934
I didn't understand a thing you just said.
>>
File: psycho_pass_gui2.jpg (76KB, 1280x720px) Image search: [Google]
psycho_pass_gui2.jpg
76KB, 1280x720px
Cyberpunk when?
>>
File: psycho_pass_gui.jpg (33KB, 736x342px) Image search: [Google]
psycho_pass_gui.jpg
33KB, 736x342px
>>62472284
>>
>>62471990

> What are LGPL obligations, exactly?

Some Qt5 libraries (Core, GUI, Widgets) and 80% of all add-ons are licensed under the LGPLv3. Basically, you must dynamic link everything, make a cute "Qt5 about box" and (the worst part) make easy to end user to swap the Qt libraries if we want. This sucks because the deploy (on Windows at least) is huge (tons of DLLs for simple stuff). Others like the Charts and Data Visualization are GPLv3: You must release the source code. No excuses
>>
>>62471515
>>62471843
>>62471934
>>62471949
>>62472161
No I mean aren't the GUIs just composed of pre-saved images that you import? That's how it works on ROBLOX.
>>
>>62472310
>make a cute "Qt5 about box"
That is not true at all.

>make easy to end user to swap the Qt libraries if we want
Why is that so bad? That is easily possible with most libraries anyway (I can just replace the relevant DLLs).
>>
File: elv13.png (592KB, 1916x1080px) Image search: [Google]
elv13.png
592KB, 1916x1080px
>>62472348
I have no idea about qt but awesome draws vectors which you can ofc do with lua. I imagine qt uses vectors? But icons are image files.

>>62471471
Thats never happened to me because I have only used a rather simple set up and admittedly never successful got all of pic related to install right, so you may have a valid point. I imagine the work arounds are relatively simple though?
>>
>>62472429
What is that supposed to mean?
>>
>>62472353

Section 4-C
It's a must.
>>
>>62467707
gt, gtk, elementary, wxWidgets, windows apis for drawing windows and boxs and shit.
You can even get the x11 library and roll your own drawings in the x window system to make your own gui by drawing lines and shit and get bonus points for pissing off other autists
>>
>>62472432
You don't know what vector graphics are?
>>
>>62472432
If you define a box in the code as Height: 30 pixels and Width: 45 pixels then the code "draws" a box on screen. I guess they may not be technically vectors if they don't include the angle but in "box" class I suppose the angles are defined as 90 degrees.
>>
>>62472476
In other words, it isn't just drawing pre-rendered PNGs to the screen. Which answers this question: >>62471217
>>
>>62472474
You mean like abstractions of shapes which aren't really real, but when it comes time to show them they become real. Sorta like they're in a superposition of all possible file-sizes until they're observed by the interpreter and become static objects.
>>62472476
>>62472495
So it's not like my ROBLOX. How's the overhead on the WM? Does it leak harder than my Grandmother on Miralax trying to learn how to use Gnome (in this case gnome would be the leakier of the two)?
>>
>>62472528
>You mean like abstractions of shapes which aren't really real, but when it comes time to show them they become real. Sorta like they're in a superposition of all possible file-sizes until they're observed by the interpreter and become static objects.
How much weed are you smoking right now?

>>62472528
>So it's not like my ROBLOX. How's the overhead on the WM? Does it leak harder than my Grandmother on Miralax trying to learn how to use Gnome (in this case gnome would be the leakier of the two)?
Awesome is light weight, fast and clean.
>>
>>62472429
what is this cancer de?
I feel like collecting it.
>>
>>62472546
>How much weed are you smoking right now?
I am exactly on the 0th plateau of the marijuana right now, my fellow anonymous American BBS forum poster.
>Awesome is light weight, fast and clean.
Show us your top.
>>
>>62470393
>>62472429
>[email protected]
>Jose' Lepagee
Anime was very like a mistake.
>>
File: john doe.png (5KB, 721x187px) Image search: [Google]
john doe.png
5KB, 721x187px
>>62472566
>Show us your top.
>>
>>62472663
Hot
>>
>>62472555
>>62472598
Seriously awesome is the only WM I know of that can come even close to futuristic and low eye strain, but it still takes a bunch of customization and coding it yourself.

Why is it taking so fucking long for people to actually produce aesthetic UIs that dont give me a headache? Its not just anime. Almost every fictional UI from the 80s on have been hexagonal and blue yet IRL its just more of the same gay, headache inducing flat or skeuomorphic bs.

My only theory is that actual futuristic UIs don't take enough resources so they're not bloaty enough for apple and windows to enforce planned obsolescence. Otherwise people need to understand that just because coding boxes is easy doesnt mean that a triangle or goddamn hexagon would be soooo hard.
>>
>>
File: action_replay_gba_soft_big.jpg (109KB, 757x547px) Image search: [Google]
action_replay_gba_soft_big.jpg
109KB, 757x547px
>>62472762
every de is either stuck in the 90s(lxde) or trying WAY too hard to be a tablet/phone de (gnome).
My guess is all of the de developers are just too stuck in their ways with hacked together bullshit to actually make a de from scratch to fit the scifi look that we want.
enlightenment or whatever their de is called actually made a good attempt but it just turned out to look like a broken playstation 2 action replay menu
>>
File: 9a6e048fce69e09d59b0943a6cdc3e4c.jpg (332KB, 1280x534px) Image search: [Google]
9a6e048fce69e09d59b0943a6cdc3e4c.jpg
332KB, 1280x534px
>>62472828
Someday anon.. someday..

On the bright side, that means there is a big gaping vagina of a hole in the "market." So there is a chance for somebody to meet the demand and make a name fore themselves.

I wonder if that kind of thing could be implemented into something like Ncurses so it would work directly in the terminal?
>>
>>62473076
>could be implemented into something like Ncurses
DELID THIS!
for the love of god no.

Also good luck getting anyone to actually install a de made by some no name random. Even if it is open source people are gonna think you're upto something.
>>
>>62472773
That's dumb because implies that electrons can move at different speeds in the same material. Go fuck yourself, and go back to the website you came from.
>>
>>62473186
>what is baud rate
>>
File: doritoface.jpg (6KB, 300x300px) Image search: [Google]
doritoface.jpg
6KB, 300x300px
>>62473186
someone has never done acid before

>>62473159
What are you saying? Everyone has to start somewhere.. wouldn't this no name dev gain notoriety after a while hypothetically. If people vouch for the DE then why wouldnt someone trust them? Are you saying you trust corporations like google and apple more than open source devs?
>>
>>62467721
Used Qt simply because
1, I know how to use it
2, has 99999 bindings
>>
>>62471217
>>62472348
Lua is a scripting language that a lot of game engines support because it's extremely lightweight and easy to sandbox. It doesn't actually support GUI by itself though, games like Roblox and WoW have to expose their UIs to Lua.
>>
>>62473360
True but there is this:
>http://wxlua.sourceforge.net/
>>
>>62472441
It's not, it's just the most trivial way to satisfy that requirement.

Similarly, you don't have to dynamically link to the library, you can provide your source or intermediate object files instead.
>>
don't use C++
>>
File: f35c (1).jpg (3MB, 3000x2357px) Image search: [Google]
f35c (1).jpg
3MB, 3000x2357px
>>62473417
But m8. It's the best programming language ever.
>>
>>62468286
>Qt is good, but it imposes GPL/LGPL obligations.
>but
>GPL is somehow bad.

If you aren't writing free software you shouldn't be here. Please, kindly get the fuck >>>/out/
>>
>>62473465
It's actually the least worst of the most used languages.
>>
>>62474028
What can other languages do better?
>>
>>62467728
Fuck no
>>
>>62468286
Whats wrong with Nana's widgets?
>>
>>62473258
I'm paranoid and my time in shay communities has made me even more suspicions of everything.
You are right, people would vouch for it and they would gain notoriety. But Id always have that nagging feeling in the back of my head every time I updated a package that this is they day they go for installs
>>
>>62474358
Well window managers arent thatttt complicated. The guy that modded awesome obviously understands how the program works, so there would be hypothetically a number of devs that would review the code. You can just check the updates when you install them and if any exlpoits were found then it shouldnt be long before one of the arch fags notices.

And if this dev wants to keep his good reputation he would want his code to be free of vulnerabilities and leaving some obfuscated back door would be to risky to his name. And if this person is talented a future of creativity is a lot more in line with his self interests probably than a one time exploit.
>>
>>62467707
use electron or nw.js
>>
>>62467719
/thread
>>
File: ebin.png (110KB, 699x617px) Image search: [Google]
ebin.png
110KB, 699x617px
>>62473076
Ncurses? :DDDDDDDDD

I just happen to be making a tiling/nesting gui layout library in Guile/Ncurses right now.
>>
You can use JNI and have a GUI made with Java and the rest in C++.
>>
>>62467707
i guess if you want it to work well on one platform and moderate on others its probably fine, but consider electron, javascript is an easy jump from c++ and its easy to get started
>>
>>62473360
>Lua is a scripting language that a lot of game engines support because it's extremely lightweight and easy to sandbox.
With LuaJIT it's also balls to the walls fast.
>>
File: init.png (60KB, 536x413px) Image search: [Google]
init.png
60KB, 536x413px
>>62474652
hmm, this part might be easier to recognize as ncurses code. ignore abrasive test colors...
>>
>>62470323
Nope.
If you can't figure out how to write C++, maybe you shouldn't make programs.
>>
>>62474877
lul if yall newb can't write the superior C++, kys pls lulululul
>>
>>62474877
There is a difference between "able to figure out" and "want to use". C++ with Qt is pretty easy. It just isn't much fun.

If you're getting paid to do it, then fine. But if you're spending your own free-time working on something, why use tech you don't enjoy?
>>
>>62474887
I didn't claim C++ was superior, I just said that if you can't figure out how to do the same thing in C++, you are not a good programmer.
C programmers can easily make a C++ gui for their applications using Qt.

>>62474923
Then use something else.
OP asked how to make a GUI for a C++ application. Qt is the right answer here.

Personally, I would prefer a graphical language to make GUIs.
I really like the syntax of tikz and I use this very often to make diagrams and stuff.
But if I need a GUI for my desktop applications, I write it in C++/Qt
>>
>>62474961
>Then use something else.
No shit?
>>
File: BQu6c0q.png (59KB, 738x458px) Image search: [Google]
BQu6c0q.png
59KB, 738x458px
>>62474842
snice

I have no idea what it means though because i have never looked at ncurses code before. However, I *like* ncurses as a user.

Can you make hexagonal tabs with ncurses?.. cause that would be pretty fucking neato.

Imagine if someone made a "port" of 4chan for ncurses so we never had to logon with a regular browser ever again.

Imagine never starting an x session again in your life. How refreshing would that be? Imagine if we implemented this all into temple OS.
>>
File: NtcICSF.png (178KB, 1600x918px) Image search: [Google]
NtcICSF.png
178KB, 1600x918px
>>62474842
https://docs.python.org/3/howto/curses.html

Is this a good tutorial? And is that python... in your code? Sry Ima newb.
>>
>>62475436
I don't know about that tutorial, I learned ncurses years ago from the manpages, using C.

That code is all in GNU Guile, a scheme dialect, using the Guile-Ncurses library (https://www.gnu.org/software/guile-ncurses/) The documenation for this library is decent enough, at least provided you already know your way around ncurses.

Probably the best way to learn ncurses is to write your own roguelike. That's what I did. Years back there used to be a pretty active community rec.games.roguelike.development that can provide a lot of help. I don't know if that's still active though, maybe search around for "rgrd", they used to have an IRC, maybe they still do.

>>62475396
>Can you make hexagonal tabs with ncurses?
Maybe with the right unicode characters.

Some terminal emulators have hacks to display images too. Check out 'ranger', it's a "vim inspired" (very loosely) file manager written in python with ncurses that supports image previews in some terminal emulators. Pretty slick piece of software.
>>
>>62467707
I normally write the GUI in C# and load up the DLL I wrote in C++

Quick and easy
Thread posts: 91
Thread images: 17


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.