Switching base language in Qt desktop application [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
What is the recommended way to scan Qt Desktop GUI source files for tr() translation strings and replace them in-place in the source code, with strings from another language?
Is this simply a job for a regex or is there something in Qt C++ source (for example, lupdate.exe) that could reasonably be used for modifying the source files? Or is there a more standard / idiomatic Qt way to do this?
Background:
Our source code has UI strings in Finnish. I would like them to be in English and then use qt translation to get Finnish.
Also I will then generate a new .ts file for the Finnish strings (that are currently in the C++ source files), but dealing with XML is easy in Qt anyway.
We've been building a desktop application with Qt for about 8 years. Along the way, it turned out that we should have used English as the source language (duh), and not Finnish. But we never had the time to do the switch, and now there are way too many strings to switch manually.

Related

Using qt to build GUI for pre built c program [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to the GUI development environment. I found qt to be interesting as it is a huge framework but it requires its program to be coded in C++. I want to create a small windowed GUI program which could have transitions etc. provided by QML. What are the possible ways to compile it along with existing C code with or without qt creator ?
As long as you pay attention to linkage (C functions should use C linkage), there will be no problems: a C library can safely be used in a C++ program.
For what concerns implementing your GUI with QML, start by taking a look at the Qt QML examples and work your way from there.
QML is mostly used for mobile UI render (i.e. when there's no native support openGL kicks in and renders the element via the available driver), anyway it can play along just fine on any Qt-supported platform.

Programatically creating and compiling from a program in C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Let's say we've got a first program called Program1.exe which contains the necessary information to create and compile another application called Program2.exe. Actually it could also load that information from a txt file or whatever.
Googling, I've found that this is "easy" to do in C#, using Visual Studio:
How to programatically build and compile another c# project from the current project
Programmatically Invoke the C# Compiler
The problem is that I'm not using (and can't use) C#, but C++. Summing it up, my question is if that I can do this same thing using C++.
I would prefer to do it without additional libraries, but if that's not possible, or if it's too hard to do, you can also recommend any library allowing it.
I think you'll probably have noticed it, but my goal is to use it under Windows so I don't care if it's not portable.
Thanks everybody.
It's trivial (if maybe a bit odd) for a C++ program to compile and run another based on code stored in a text file. Debugging that other program, however, isn't.

making MFC/ATL COM application platform Independent [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a rather huge project that has lot of generic C++ classes, some C++ classes with reference to MFC. The UI is all written is MFC. Application uses ATL / COM to expose objects to scripting languages such as VBA and Python. There are thousands of scripts written in VBA and python.
My next project is to make this application work on many different platforms. However when run on Windows I expect that already existing VBA scripts run. Any suggestions on what is the best way to approach at this is greatly appreciated. Please suggest programing languages or tools that could be used.If I can make use of existing c++ code base better but not necessary. Scriptable objects need to maintain the same interface as before and they should run with no Or very minimal changes to them. Also is there a easy way to move the scripts written in python 2.7 to python 3.x ?

Integrating a program written in C with another one written in C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm working on a project where I need to integrate 2 simulation software packages; as in the output from one is to be used as input for the other one, and vice versa. The exchange of information happens at every time-step of the simulation, so it occurs very frequently. Both simulation packages have support for plugins: one of them supports plugins written in C, and the other supports plugins written in C++. Is there an elegant way to integrate these two plugins to make the software packages talk to each other? I thought about reading/writing files to hard drive, but I'm hoping that there is a better way to do this.
Thanks all!
Is SOAP or RESTful service an option? That would work in both C and C++
You definitely can use files to do that, but I wouldn't recommend writing them to the disk, but to use a Memory-mapped file. There are several libraries that implement this functionality, such as Boost C++. Java has the FileChannel class that handles it

C++ Command-Line program design UI? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am given a task to develop an C++ command-line(terminal, I am using, will run the program in Linux/Ubuntu) display. But I dont like the command-line design, is there anyway to improve the UI design?
Note: I must run the program in terminal!!
ncurses. It's a lib to be able to put text wherever you want in the terminal, so you can effectively draw, ascii-art style in the terminal. It's also a very old library, so it may be a little tedious to use.
I developed a simple multiplatform console management library some time ago.
You can use it at least on Linux and Windows. It uses native calls in Windows, and standard escape codes in other platforms.
If you just want to show some colors, position the cursor, and so on, you can use it in a matter of minutes without struggling with ncurses.
The documentation (generated with doxygen) is included in the Zip file.