Wednesday, April 24, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 867  / 2 Years ago, tue, february 8, 2022, 11:36:28

I've been working on an app in Ubuntu, using C and GTK, I want to switch from GTK to QML, however I can not find anywhere on the internet info on linking QML to C functions, just C++. Is it even possible? And if so, how do I do it?



I already know you can use Javascript and C++, but I'm looking for C. My favourite languages are C and Python and I'd really like to stick with them.


More From » application-development

 Answers
5

Well, what I'm deciding to do now, after some research on my options, I'm going to just write the GUI in C++, and the rest of my app in C. After looking up how it's done, it doesn't look too difficult to mix C++ and C, the thing is I probably have over a 1000 lines of code in C, rewriting the GTK stuff shouldn't take too long with how streamlined QML is, so the C++ GUI file is going to be pretty minimal. If anyone else is interested this page will show you how to mix C and C++.


[#31788] Thursday, February 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
inaterested

Total Points: 500
Total Questions: 104
Total Answers: 92

Location: Virgin Islands (U.S.)
Member since Fri, May 7, 2021
3 Years ago
inaterested questions
Fri, Aug 12, 22, 21:24, 2 Years ago
Wed, Apr 27, 22, 17:14, 2 Years ago
Tue, Oct 26, 21, 20:41, 3 Years ago
;