Back to basic learning
-
I am still pretty impressed with MDI example.
They did not use "form" - and there is a nice one form for MDI area....o well...The submenus are "just"
class CCC_MdiChild : public QTextEdit
now I am used to use QDesiger to utilize QTextEdit standard SIGNALs ...
what would be a suggested RTFM to learn how use standard SINGNALs without QDesigner help?Let's say I wan to extract a text (word) highlighted in subwindow ( QTextEdit) -
That is a snap using QDesigner form "go to slot ..." -Is there step by step example how and where to add
necessary code ?Or am I asking too much ? ...and the answer will be RTFM...
...or can I add QTextEdit form to my MDI oroject ?
That would work great. -
I am still pretty impressed with MDI example.
They did not use "form" - and there is a nice one form for MDI area....o well...The submenus are "just"
class CCC_MdiChild : public QTextEdit
now I am used to use QDesiger to utilize QTextEdit standard SIGNALs ...
what would be a suggested RTFM to learn how use standard SINGNALs without QDesigner help?Let's say I wan to extract a text (word) highlighted in subwindow ( QTextEdit) -
That is a snap using QDesigner form "go to slot ..." -Is there step by step example how and where to add
necessary code ?Or am I asking too much ? ...and the answer will be RTFM...
...or can I add QTextEdit form to my MDI oroject ?
That would work great.@AnneRanch
I need to rewrite this post.
This is an example of how Qt builds class constructor which includes "form"
( I am not so sure naming class and form same name....).Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
ui->setupUi(this);
}This is how the actual class definition looks
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACEclass Widget : public QWidget
{
Q_OBJECTpublic:
Widget(QWidget *parent = nullptr);
~Widget();private:
Ui::Widget *ui;
};
#endif // WIDGET_HHere is how my "form-less" class definition partially looks :
class CCC_MdiChild : public QTextEdit
{
Q_OBJECTpublic:
CCC_MdiChild();etc etc
and its constructor
CCC_MdiChild::CCC_MdiChild()
{
setAttribute(Qt::WA_DeleteOnClose);
isUntitled = true;
}I have no issues adding "form.h" to the project....using QDesigner and QCreator
I need help adding "form.h" to the actual C++ code - class definition and to the default constructor.
Plain C++ - anybody ?
I'll keep this original post for a spell...
I have decided to add "form" to the project
I got as far as this and I have no idea what class is missing in the code
I got stomped by adding " ui_form" header, and recall discussing that long time ago. I guess this time it is "just the way it is "