1

I am trying to make a decision for what to use to continue developing my application. I have some experience with C++ in the MFC Document/View architecture and have found it very frustrating. I felt I was always fighting the framework and also felt that my application didn't fit the doc/view architecture. (I now know that it probably would have fit, if I had known how to structure it that way.)

So I decided to try Python and ended up using tkinter. That was easier to learn and didn't have as many frustrations. (Though it had a few different new ones.) I think I learned a bit more about object orientation and setting up classes along the way. But am now concerned about the fact that it is an interpreted language and much slower than C++ for my purpose.

So I have been wanting to go back to C++ but not MFC. I have read a little about wxWidgets and Qt.

So here are the things I want to know:

  1. For wxWidgets and Qt, do they use a resource editor for setting up the layout of a GUI or directly expose the code the way Python and tkinter do.

  2. Do either wxWidgets or Qt produce any interpreted code or is everything ultimately compiled into native machine code?

Thanks

4
  • Neither of these are interpreted. In the case of Qt if it generates code the code it generates is c++ code that gets complied to native machine code using a c++ compiler. Commented Nov 28, 2013 at 2:34
  • Qt has a resource editor. Called QtDesigner. You can design your forms, widgets .. in that and or code directly in c++. Commented Nov 28, 2013 at 2:36
  • I have only briefly used wxwidgets (and that was years ago) so I can not comment on that further. Commented Nov 28, 2013 at 2:37
  • Do you nee real Mutlithreading? Then you cannot use python in this case, since here only one thread is active at a time (in default cPython implementation, which is comonly used). If you can outsource mutlithreading parts to a lib you can run it in parallel with other threads. MT with python is complicated. You can read or about it searching for "global interpreter lock". Commented Nov 28, 2013 at 9:05

1 Answer 1

3
1. Both

Qt and wxWidgets have GUI builders available. In the case of Qt, an XML file is produced that is parsed by the uic to produce C++ code. wxWidgets has several designers available, they will differ between them, but I'll be surprised if they don't all follow the same pattern.

However many people, myself included, choose to hand code - there is no requirement to use the UI designers. Be careful using the term 'resource editor', as Qt has a Resource Editor and it is not used for designing GUIs.

2.  Both

Qt and wxWidgets are not just GUI frameworks - they're cross-platform toolkits. In view of this, Qt is pushing for a clear separation between GUI and backend by using QtQuick and the QML language for GUI development. Qt5 still has full support for C++ widget-based development of course. wxWidgets has no equivalent that I'm aware of.

Also, if you liked Python but not tkinter, both Qt and wxWidgets have Python bindings.

Sign up to request clarification or add additional context in comments.

2 Comments

For Qt, the Resource Editor is integrated with Designer, allowing you to specify the resource files (such as icons) that are needed by GUI form elements. So it most certainly does have something to do with GUIs.
The resource system is just a way of storing arbitrary data within an artefact so it can be accessed as if it was local drive - the fact that you store files in it that the GUI can use (or is the GUI in case of QML files) is irrelevant. The two systems are not tied nor dependent, the editor is accessible from the Designer as a matter of convenience only. However, that isn't clear from my sentence so I'll edit it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.