<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Back to basic learning]]></title><description><![CDATA[<p dir="auto">I am still pretty impressed with MDI example.<br />
They did not use "form" - and there  is a nice one form for MDI area....o well...</p>
<p dir="auto">The submenus are "just"</p>
<p dir="auto">class CCC_MdiChild : public QTextEdit</p>
<p dir="auto">now I am used to use QDesiger to utilize QTextEdit   standard SIGNALs ...<br />
what would be a  suggested  RTFM to learn how  use standard SINGNALs  without QDesigner  help?</p>
<p dir="auto">Let's  say I wan to extract a text (word) highlighted in subwindow ( QTextEdit)  -<br />
That is a snap using QDesigner form "go to slot ..." -</p>
<p dir="auto">Is there step  by step example  how and where  to add<br />
necessary code ?</p>
<p dir="auto">Or am I asking too much ? ...and the  answer will be RTFM...</p>
<p dir="auto">...or can I add QTextEdit  form to  my MDI oroject ?<br />
That would work great.</p>
]]></description><link>https://forum.qt.io/topic/139330/back-to-basic-learning</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 08:04:10 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139330.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Sep 2022 01:54:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Back to basic learning on Sat, 17 Sep 2022 04:28:14 GMT]]></title><description><![CDATA[<p dir="auto">@AnneRanch</p>
<p dir="auto">I need to rewrite  this post.</p>
<p dir="auto">This is an example of  how Qt builds class constructor which includes "form"<br />
( I am not so sure naming class and form same name....).</p>
<p dir="auto">Widget::Widget(QWidget *parent)<br />
: QWidget(parent)<br />
, ui(new Ui::Widget)<br />
{<br />
ui-&gt;setupUi(this);<br />
}</p>
<p dir="auto">This is how the actual class definition looks</p>
<p dir="auto">QT_BEGIN_NAMESPACE<br />
namespace Ui { class Widget; }<br />
QT_END_NAMESPACE</p>
<p dir="auto">class Widget : public QWidget<br />
{<br />
Q_OBJECT</p>
<p dir="auto">public:<br />
Widget(QWidget *parent = nullptr);<br />
~Widget();</p>
<p dir="auto">private:<br />
Ui::Widget *ui;<br />
};<br />
#endif // WIDGET_H</p>
<p dir="auto">Here is how my "form-less" class definition partially looks :</p>
<p dir="auto">class CCC_MdiChild : public QTextEdit<br />
{<br />
Q_OBJECT</p>
<p dir="auto">public:<br />
CCC_MdiChild();</p>
<p dir="auto">etc etc</p>
<p dir="auto">and its constructor</p>
<p dir="auto">CCC_MdiChild::CCC_MdiChild()<br />
{<br />
setAttribute(Qt::WA_DeleteOnClose);<br />
isUntitled = true;<br />
}</p>
<p dir="auto">I have no issues adding  "form.h"  to the project....using QDesigner and QCreator</p>
<p dir="auto"><strong>I need help adding "form.h" to the actual C++ code - class definition and to the default constructor.</strong></p>
<p dir="auto">Plain C++ - anybody ?</p>
<p dir="auto">I'll keep this original post for a spell...</p>
<p dir="auto">I have decided to add "form" to the project<br />
I got as far as this and I have no idea what class is missing in the code</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/af8cfe10-51db-4387-8031-76d97d0d399d.png" alt="06bd7fd0-5e4f-4801-a214-ed34a9f1f2cf-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">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 "</p>
]]></description><link>https://forum.qt.io/post/728790</link><guid isPermaLink="true">https://forum.qt.io/post/728790</guid><dc:creator><![CDATA[Anonymous_Banned275]]></dc:creator><pubDate>Sat, 17 Sep 2022 04:28:14 GMT</pubDate></item></channel></rss>