<?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[More #include questions...]]></title><description><![CDATA[<p dir="auto">I  have manged to "add exiting project as library "  to my MAIN subdirs .pro.</p>
<pre><code>unix:!macx: LIBS += -L$$OUT_PWD/../../../../../../../../../../home/qe/Qt/Examples/Qt-5.15.2/bluetooth/btscanner/ -lbtscanner

INCLUDEPATH += $$PWD/../../../../../../../../../../home/qe/Qt/Examples/Qt-5.15.2/bluetooth/btscanner
DEPENDPATH += $$PWD/../../../../../../../../../../home/qe/Qt/Examples/Qt-5.15.2/bluetooth/btscanner

</code></pre>
<p dir="auto">Then I add  #include "device.h" to my MAIN subdir main.cpp</p>
<pre><code>#include "mainwindow.h"
#include "ui_mainwindow.h"

**#include "device.h"**

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui-&gt;setupUi(this);

    DeviceDiscoveryDialog *DDD = new  DeviceDiscoveryDialog();
    DDD-&gt;show();
    // test sub dialog
//    TEST_SUB_Dialog  *TSD = new TEST_SUB_Dialog();


}
</code></pre>
<p dir="auto">Checking  the added #include "device.h"</p>
<pre><code>#ifndef DEVICE_H
#define DEVICE_H

#include "ui_device.h"

#include &lt;qbluetoothaddress.h&gt;
#include &lt;qbluetoothdevicediscoveryagent.h&gt;
#include &lt;qbluetoothlocaldevice.h&gt;
//.include &lt;qbluetoothlocalde#vice.h&gt;
//#include &lt;QBluetoothLocalDevice/qbluetoothlocalde#vice.h &gt;
#include &lt;QDialog&gt;
</code></pre>
<p dir="auto">I find another missing #inlcude(s) -  <strong>however using "follow symbol under cursor" I can open the "missing #include &lt;qbluetoothlocaldevice.h".</strong></p>
<p dir="auto">Obviously  suddirs failed to add dependencies for "device"</p>
<ol>
<li>what is the proper  - preferably using wizards - way  to add such dependencies  to "device" ?</li>
<li>Why can I open the missing depended (downstream ) include but compiler cannot find it ?</li>
<li>This is what "device .h include hierarchy " tells me</li>
</ol>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/3cf4cfbe-8d8e-442a-b29c-fd4ea36d9af1.png" alt="9942c5d7-5725-42f8-a02f-ce629232582e-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/132049/more-include-questions</link><generator>RSS for Node</generator><lastBuildDate>Tue, 03 Nov 2026 11:32:34 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/132049.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Nov 2021 21:12:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to More #include questions... on Tue, 16 Nov 2021 23:54:48 GMT]]></title><description><![CDATA[<p dir="auto">SOLVED</p>
<p dir="auto">The project  .pro file I added as library DOES have QT  bluetooth<br />
as first line of .pro<br />
For good measure I have added this  to my main project.</p>
<p dir="auto">''QT       += core gui core bluetooth widgets</p>
<p dir="auto">So the moral of the story is</p>
<p dir="auto">add QT object macro to the .pro file of appropriate .pro file MANUALLY</p>
]]></description><link>https://forum.qt.io/post/690380</link><guid isPermaLink="true">https://forum.qt.io/post/690380</guid><dc:creator><![CDATA[Anonymous_Banned275]]></dc:creator><pubDate>Tue, 16 Nov 2021 23:54:48 GMT</pubDate></item><item><title><![CDATA[Reply to More #include questions... on Tue, 16 Nov 2021 21:17:06 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">@AnneRanch said in <a href="/post/690357">More #include questions...</a>:</p>
<blockquote>
<p dir="auto">QBluetoothLocalDevice</p>
</blockquote>
<p dir="auto">That's a class from the QtBluetooth module. If it's included in one of your class header you need to add <code>QT += bluetooth</code> to the project that uses your library.</p>
]]></description><link>https://forum.qt.io/post/690359</link><guid isPermaLink="true">https://forum.qt.io/post/690359</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 16 Nov 2021 21:17:06 GMT</pubDate></item></channel></rss>