Console/Terminal Widget for Qt? - qt

Anyone know of any widget in Qt4 that acts as a terminal/console? Open-source would be good.
Thanks in advance.

QConsole used to do something like that. (Not sure the project is active anymore, but you might want to have a look).

Found some decent source code here. Very basic functionality, but I've been adding to it some and I think it has promise to do what I need it to.
NOTE: I have only tested this code in Win32.
Here is a link to my new question concerning this code.

If you are on Qt6, you can use the QLightTerminal.

If you're on Qt5 now, there's the QTermWidget widget from the LXQt project.

Related

How to use custom widget in Qt-Designer

I want to use a custom widget in the GUI-Designer of Qt-Creator IDE.
So i created a class which inherits from Qt's QWidget. It worked to place
it on a QMainWindow programaticaly, but have to do my work in the desiger
where it does not appear as an option in the kist of components.
I googled to find a solution for problem an found an manual on, who guesses, the
Qt doc page ( https://doc.qt.io/archives/qt-4.7/designer-creating-custom-widgets.html
and https://doc.qt.io/archives/qt-4.7/designer-creating-custom-widgets.html).
I tried to follow it but doesn't work.
Does someone know an other way to do this or can give a hint where i can search
for problems following this tutorial?
Thanks in advance.
Codierknecht
There is a different example in the examples section of the Qt documentation that I think is a lot clearer.
Custom Widget Plugin Example
It was a little unclear to me when reading the tutorial where the Q_EXPORT_PLUGIN2() macro goes, but having full example code and project alleviates that.
If you are like me, the analog clock example didn't do it for you, in which case I found just one better tutorial. It may be on the kde site but I you dont need kde to do it, it just explains how to make the custom widget a plugin so you can add it into Qt Designer, rather than having to code it in, which is the norm when you just add a widget to your project and customize the class. I hope this page helps you like it helped me, get in the right direction of writing a single Qt Designer (or multiple) plugin:
Writing Qt Designer Plugins
If this link ever becomes dead, just do a search for the link itself, usually that will turn up the original page in someone's cache, as they do in the other examples above (the dead links in the above answers that just take you to main area and not to the pages originally intended).

Qt "QTextEdit" Functions

Well, i'm doing an IDE System. Basically, everything works Fine. Though, but i have a problem. The class "QTextEdit" doesn't have the member "setCompleter" which is for autocomplete. Right?
Well, is some class that supports it including all QTextEdit members?
PS: Any better way to do Autocomplete? I've asked this before, but i heard you can do it with QReg , but no idea.
Thanks!
The Qt documentation has an example on how to extend QTextEdit with a custom auto-completer here: http://doc.qt.io/qt-5/qtwidgets-tools-customcompleter-example.html

Is it possible to embed Qt Assistant as a widget inside my application?

We're running one of our apps on a 8" touch screen and want to add help to it.
Launching Qt Assistant from a menu item works fine for desktop applications, but for touch applications it's far from ideal.
I haven't been able to figure out if it is possible, or permitted to do so?
QAssistant.exe itself seems to come with some license restrictions, but maybe there's another way to do this, like embedding a small web-browser or something.
Have anyone else tackled this, or something similar?
Check out how QtCreator does this, they have integrated QtHelp which looks exactly like what you're trying to do. The library they use for that is the QtHelp module (I think).
You should check the documentation for QHelpEngine and QHelpContentWidget. I think that these classes will meet your needs.
Another way would be to actually see how Qt Assistant is implemented, by looking at the source.

Useful Qt Plugins

I'm a tad new to qt and so far I really only added qwt; but I was wondering, what are some other useful qt plugins? And is there a list somewhere?
Thanks in advance.
you could try http://www.libqxt.org/ and http://medieninf.de/qmapcontrol/
For me, one of the useful Qt plugin was wwWidgets. Also, as I needed zip/unzip functions in one of my projects, QuaZIP - Qt/C++ wrapper for ZIP/UNZIP package helped me a lot!
Don't use it before, but QCA is one of the things I want to test.
Good luck!
The Common Toolkit ( CTK ).
Here is an image gallery.
Have a look at inqlude. It lists a pretty decent number of available 3rd party Qt components and add-ons.
Besides these, there are also some commercial components available, like the ones from Developer Machines (Ribbon, DataGrid, etc.) and KDAB (Soap, Report, Chart).

Qt QFileDialog input field - tab complete like shell

I've got a basic PyQt QFileDialog file browser goin in Python, Kubuntu.
My issue is I would like the "tab key" in the file input to act as tab-complete does in a shell.
Is there any way to accomplish this?
From a UI/UX standpoint are you sure that's what you want? In forms and dialogs tab has traditionally meant go to next field. You might be confusing the user. Or you might start a revolution in User Experience for forms :-)
Just curious if that's what you really want?
You will have to subclass the QFileDialog, and change the behavior. It will probably not be easy.
I haven't made use of PyQt yet, but I think the QCompleter class might be most of the way to what you want:
http://doc.trolltech.com/4.5/tools-completer.html
I don't know if it tab completes or if that's something you'd have to add yourself.
I am not sure you can actually, i don't see any access to the input field in the documentation of QFileDialog. Qt is fairly aggressive at hiding implementation detail from it's users. You might be able to do this by taking the implementation of QFileDialog (C++) and modify it for your purpose.

Resources