<?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[QUdpSocket readyRead() is not emitted]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/85860/qudpsocket-readyread-never-emitted">QUdpSocket readyRead never emitted</a></p>
<p dir="auto">I believe I'm seeing the same issue where my readyRead() signal from QUdpSocket is not being emitted.<br />
This thread last updated a year ago does not seem to have the solution:<br />
<a href="https://forum.qt.io/topic/85860/qudpsocket-readyread-never-emitted/15">https://forum.qt.io/topic/85860/qudpsocket-readyread-never-emitted/15</a></p>
<p dir="auto">I'm very puzzled and am currently using a while loop with a 20ms wait but of course this is not an ideal workaround. We want to take advantage of the event loop triggering the readyRead() signal. I did try the bytesAvailable() signal as suggested above without any luck.</p>
<p dir="auto">Here is my code in case anyone can provide advice. It would be greatly appreciated. I am developing on Ubuntu 18.04 with Qt5.9.5 and another person on stackoverflow has indicated that it is working for him on his mac os.<br />
myudp.h</p>
<pre><code>class MyUDP : public QObject
{
    Q_OBJECT
public:
    explicit MyUDP(QObject *parent);
    void initSocket(u_int16_t p);

private:
    u_int16_t port;
    QUdpSocket *udpSocket = nullptr;

signals:

private slots:
    void processPendingDatagrams();
    void onSocketStateChange (QAbstractSocket::SocketState state);
    void testSlot();
};
</code></pre>
<p dir="auto">myudp.cpp</p>
<pre><code>#include "myudp.h"

MyUDP::MyUDP(QObject *parent) : QObject(parent) {
}

void MyUDP::testSlot() {
    qDebug() &lt;&lt; "test slot..." &lt;&lt; endl;
}

void MyUDP::initSocket(u_int16_t p) {
    port = p;

    udpSocket = new QUdpSocket(this);

    bool bindSuccess = udpSocket-&gt;bind(QHostAddress::AnyIPv4, port);
    if (!bindSuccess) {
        qDebug() &lt;&lt; "Error binding to port " &lt;&lt; port &lt;&lt; " on local IPs";
        return;
    }
    qDebug() &lt;&lt; "Bound to port " &lt;&lt; port &lt;&lt; " on local IPs";
    processPendingDatagrams();
    connect(udpSocket, SIGNAL(readyRead()), this, SLOT(processPendingDatagrams()), Qt::QueuedConnection);
    connect(udpSocket, SIGNAL(readyRead()), this, SLOT(testSlot()), Qt::QueuedConnection);
}

void MyUDP::processPendingDatagrams() {
    qDebug() &lt;&lt; "readPendingDatagrams()\n";

    QHostAddress sender;
    while (udpSocket-&gt;hasPendingDatagrams()) {
        QByteArray datagram;
        datagram.resize(udpSocket-&gt;pendingDatagramSize());
        udpSocket-&gt;readDatagram(datagram.data(), datagram.size(), &amp;sender, &amp;port);
        qDebug() &lt;&lt; "Message From :: " &lt;&lt; sender.toString();
        qDebug() &lt;&lt; "Port From :: " &lt;&lt; port;
        qDebug() &lt;&lt; "Message :: " &lt;&lt; datagram.data();
    }
}
</code></pre>
<p dir="auto">main.cpp</p>
<pre><code>int main(int argc, char *argv[])
{
    u_int16_t port = 7777;
    qDebug() &lt;&lt; "MyUDP version. " &lt;&lt; endl;

    MyUDP *myUDP = new MyUDP(0);
    myUDP-&gt;initSocket(port);

    QCoreApplication a(argc, argv);

    a.exec();
    return 0;
}
</code></pre>
<p dir="auto"><a href="https://stackoverflow.com/questions/54209604/can-i-use-qudpsockets-wo-polling-or-custom-classes-in-qt" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/54209604/can-i-use-qudpsockets-wo-polling-or-custom-classes-in-qt</a></p>
]]></description><link>https://forum.qt.io/topic/98658/qudpsocket-readyread-is-not-emitted</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 18:59:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/98658.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Jan 2019 23:26:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Wed, 23 Jan 2019 19:33:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aha_1980">@<bdi>aha_1980</bdi></a> Thanks for the encouragement. I got this to build last evening by adding:</p>
<pre><code>#include &lt;stdint.h&gt;
</code></pre>
<p dir="auto">to our db.h file. I'm not sure if that was the correct solution or if there was something wrong with the make file. Here is the make file for reference:</p>
<pre><code>
MAJOR_VER=1
MINOR_VER=0
PATCH_VER=0

DEB_MAINTAINER=

####### Sets include paths
FILTEC_BUILD="no"

####### Enable/Disable DEBUG build with "yes" or "no"
DEBUG="no"

APP_BASE_NAME=historian

BUILD_FILE = build.cpp

SRCPP =	main.cpp db.cpp syslog.cpp log.cpp common.cpp pid.cpp $(BUILD_FILE)
SRCPP += mqtt_sub.cpp ve_util.cpp ve_mqtt.cpp udp_server.cpp moc_udp_server.cpp

OBJDIR = ./obj
BINDIR = ./bin
RELDIR = ../release
MAKEOBJDIR := $(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR) ; fi )
MAKEBINDIR := $(shell if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR) ; fi )
MAKERELDIR := $(shell if [ ! -d $(RELDIR) ]; then mkdir $(RELDIR) ; fi )

APPNAME	= $(BINDIR)/$(APP_BASE_NAME)

OBJ = $(SRCPP:%.cpp=$(OBJDIR)/%.o)

ifeq ($(FILTEC_BUILD),"yes")
QTPATH        = /home/filtec/Qt5.2.1/5.2.1/gcc_64
QTINCPATH     = $(QTPATH)/include
else
QTPATH        = /usr/include
QTINCPATH     = $(QTPATH)/x86_64-linux-gnu/qt5
endif

#######################################

INCLUDEPATH := -I./ -I$(QTINCPATH) -I$(QTINCPATH)/QtCore -I$(QTINCPATH)/QtNetwork -Ithirdparty/mosquitto/include -Ithirdparty/sqlite3/include

CFLAGS = -Wall -Wno-trigraphs -pipe -fno-strict-aliasing -fno-common -fshort-enums
CFLAGS += $(INCLUDEPATH) -fPIC
CFLAGS += -Wformat-security
CFLAGS += -DLINUX
CFLAGS += -DMAJOR_VERSION=$(MAJOR_VER)
CFLAGS += -DMINOR_VERSION=$(MINOR_VER)
CFLAGS += -DPATCH_VERSION=$(PATCH_VER)

LDLIBS = -lpthread -lQt5Core -lQt5Network

LDLIBS += -lsqlite3
LDLIBS += -lmosquitto


ifeq (.version,$(wildcard .version))
BUILD_TMP := $(shell eval expr 0`cat .version` + 1 &gt; .version)
else
BUILD_TMP := $(shell echo 0 &gt; .version)
endif
BUILD_NUMBER := $(shell cat .version)
BUILD_DEB := $(shell eval expr 0`cat .version` + 1)

ifeq ($(DEBUG),"yes")
CFLAGS += -O1
CFLAGS += -g -rdynamic -DDEBUG
DBG_SUFFIX=-dbg
else
CFLAGS += -O3
endif

CC=g++
NM = $(CROSS)nm
STRIP = $(CROSS)strip
STRIPFLAGS = --strip-all --remove-section=.note --remove-section=.comment

#######################################

# FIL-3131 adding patch number to distinguish it from build number
#BASENAME = $(APPNAME)-$(MAJOR_VER).$(MINOR_VER).$(BUILD_NUMBER)$(DBG_SUFFIX)
BASENAME = $(APPNAME)-$(MAJOR_VER).$(MINOR_VER).$(PATCH_VER)+$(BUILD_NUMBER)$(DBG_SUFFIX)

#######################################

.PHONY: all clean do-it-all depend with-depends without-depends

all: do-it-all

ifeq (.depends,$(wildcard .depends))
include .depends
do-it-all: with-depends
else
do-it-all: without-depends
endif

without-depends: depend with-depends

depend: $(BUILD_FILE)
	rm -f .depends
	set -e; for F in $(SRC); do echo -n $(OBJDIR)/ &gt;&gt; .depends; $(CC) -MM $(CFLAGS) $$F &gt;&gt; .depends; done

with-depends: $(OBJ) $(BASENAME)

## Compile
$(OBJDIR)/%o : %c
	$(CC) $(INCLUDES) $(CFLAGS) -c $&lt; -o $@

$(OBJDIR)/%o : %cpp
	$(CXX) $(INCLUDES) $(CFLAGS) -c $&lt; -o $@

$(OBJ): ./Makefile

$(BASENAME): $(OBJ)
	$(CC) $(CFLAGS) $^ -o $@ $(LDLIBS)
ifeq ($(DEBUG),"yes")
	$(NM) $(BASENAME) | sort &gt; $(BASENAME).map
else
	$(STRIP) $(STRIPFLAGS) $@
endif
	cp $(BASENAME) $(BINDIR)/$(APP_BASE_NAME)

$(BUILD_FILE): ./Makefile .version
	@echo \#include \"main.h\" &gt; .ver
	@echo -n "const int BuildVersion = " &gt;&gt; .ver
	@cat .version &gt;&gt; .ver
	@echo ";" &gt;&gt; .ver
	@mv -f .ver $@

# BEWARE the debian/changelog format is very, very picky!
# There must always be specific numbers of spaces in certain places.
# Change with extreme caution.
DEB_CHANGELOG=./debian/changelog
changelog: ./Makefile $(DEB_CHANGELOG)
	@echo "$(APP_BASE_NAME) ($(MAJOR_VER).$(MINOR_VER).$(PATCH_VER)-dev+$(BUILD_DEB)) stable; urgency=low\n"  &gt; debian/changelog
	@echo "  * Initial Historian Release. See FIL-3131\n" &gt;&gt; debian/changelog
	@echo -n " -- maintainer $(DEB_MAINTAINER)  " &gt;&gt; debian/changelog
	@echo `date +"%a, %d %b %Y %H:%M:%S %z"` &gt;&gt; debian/changelog

deb: changelog
	dpkg-buildpackage -b -uc

debclean:
	/usr/bin/debclean

tags: $(SRCPP) *h ./Makefile
	-ctags *cpp *h

# reformat code with
CODE_STYLE=astyle
CODE_STYLE_PARMS=--style=linux --indent=tab --indent-col1-comments --indent-preproc-cond
style:
	set -e; for F in $(SRC) $(SRCPP) $(wildcard *.h) ; do $(CODE_STYLE) $(CODE_STYLE_PARMS) $$F ; done

clean:
ifeq (.version,$(wildcard .version))
	$(shell eval expr 0`cat .version` - 1 &gt; .version)
endif
	-rm -f .depends tags $(BUILD_FILE)
	-rm -fR $(OBJDIR)
	-rm -fR $(BINDIR)

TARFILE=`date +"data-historian-%Y-%m-%d.tar"`

distclean: clean debclean
	rm -f ../$(APP_BASE_NAME)_*.buildinfo
	rm -f ../$(APP_BASE_NAME)_*.changes

distgz: distclean
	cd .. &amp;&amp; tar cf $(TARFILE) data-historian/* &amp;&amp; gzip -f $(TARFILE) &amp;&amp; cd -

# FIL-3174 Added to process Q_OBJECT directive for QObject slots.
moc_udp_server.cpp: udp_server.h
	moc udp_server.h &gt; moc_udp_server.cpp
moc_udp_server.o: moc_udp_server.cpp
	g++ $(CFLAGS) moc_udp_server.cpp -o moc_udp_server.o
</code></pre>
<p dir="auto">I'm not the original author of this app but if there are things to cleanup I happy to hear about it.</p>
]]></description><link>https://forum.qt.io/post/506720</link><guid isPermaLink="true">https://forum.qt.io/post/506720</guid><dc:creator><![CDATA[James Mark Chan]]></dc:creator><pubDate>Wed, 23 Jan 2019 19:33:28 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Wed, 23 Jan 2019 06:20:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james-mark-chan">@<bdi>James-Mark-Chan</bdi></a></p>
<p dir="auto">The correct solution is to fix your code. Your build server already told you, that the code is relying on external includes to compile. Now you want to fix this by changing the external includes?!</p>
<p dir="auto">This problem can come back anytime. Better fix it now.</p>
]]></description><link>https://forum.qt.io/post/506560</link><guid isPermaLink="true">https://forum.qt.io/post/506560</guid><dc:creator><![CDATA[aha_1980]]></dc:creator><pubDate>Wed, 23 Jan 2019 06:20:59 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Wed, 23 Jan 2019 01:09:25 GMT]]></title><description><![CDATA[<p dir="auto">It seems that another solution could be to do an install of the 5.9 or 5.12 into the target environment. This environment does not have a desktop, does anyone know if the silent installer feature works now? I was thinking of using:</p>
<pre><code>sudo ./qt-opensource-linux-x64-5.12.0.run --platform minimal
</code></pre>
<p dir="auto">Will that work or is the script command also necessary?</p>
]]></description><link>https://forum.qt.io/post/506546</link><guid isPermaLink="true">https://forum.qt.io/post/506546</guid><dc:creator><![CDATA[James Mark Chan]]></dc:creator><pubDate>Wed, 23 Jan 2019 01:09:25 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Wed, 23 Jan 2019 00:47:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> I'm curious if added:</p>
<pre><code>#include &lt;moc_myfile.cpp&gt;
</code></pre>
<p dir="auto">Is the benefit that I don't need to compile an independent moc_myfile.o or would that step still be necessary?</p>
]]></description><link>https://forum.qt.io/post/506544</link><guid isPermaLink="true">https://forum.qt.io/post/506544</guid><dc:creator><![CDATA[James Mark Chan]]></dc:creator><pubDate>Wed, 23 Jan 2019 00:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Tue, 22 Jan 2019 09:11:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aha_1980">@<bdi>aha_1980</bdi></a> Sounds excellent --- I started on 1K RAM, no flash mem, and a cassette recorder.... :)</p>
]]></description><link>https://forum.qt.io/post/506346</link><guid isPermaLink="true">https://forum.qt.io/post/506346</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 22 Jan 2019 09:11:57 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Tue, 22 Jan 2019 09:08:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a></p>
<p dir="auto">If you can handle 12 kB RAM (no dynamic allocation!) and 128 kB Flash... ;)</p>
]]></description><link>https://forum.qt.io/post/506344</link><guid isPermaLink="true">https://forum.qt.io/post/506344</guid><dc:creator><![CDATA[aha_1980]]></dc:creator><pubDate>Tue, 22 Jan 2019 09:08:09 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Tue, 22 Jan 2019 08:36:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aha_1980">@<bdi>aha_1980</bdi></a> If you're still coding in C rather than C++, can you give me a job, please ;-)</p>
]]></description><link>https://forum.qt.io/post/506333</link><guid isPermaLink="true">https://forum.qt.io/post/506333</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 22 Jan 2019 08:36:11 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Mon, 21 Jan 2019 06:43:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> You're right. I'm just coding too much in C ;)</p>
]]></description><link>https://forum.qt.io/post/506050</link><guid isPermaLink="true">https://forum.qt.io/post/506050</guid><dc:creator><![CDATA[aha_1980]]></dc:creator><pubDate>Mon, 21 Jan 2019 06:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Mon, 21 Jan 2019 06:41:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aha_1980">@<bdi>aha_1980</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/james-mark-chan">@<bdi>James-Mark-Chan</bdi></a> Since C++11 it is &lt;cstdint&gt;<br />
<a href="https://en.cppreference.com/w/cpp/types/integer" target="_blank" rel="noopener noreferrer nofollow ugc">https://en.cppreference.com/w/cpp/types/integer</a></p>
]]></description><link>https://forum.qt.io/post/506048</link><guid isPermaLink="true">https://forum.qt.io/post/506048</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 21 Jan 2019 06:41:24 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Sat, 19 Jan 2019 06:23:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james-mark-chan">@<bdi>James-Mark-Chan</bdi></a> <code>uint32_t</code> is in <code>stdint.h</code>. you probably miss an include which on your system is implicitely given.</p>
]]></description><link>https://forum.qt.io/post/505791</link><guid isPermaLink="true">https://forum.qt.io/post/505791</guid><dc:creator><![CDATA[aha_1980]]></dc:creator><pubDate>Sat, 19 Jan 2019 06:23:47 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Sat, 19 Jan 2019 03:55:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi, a quick update. After I added these lines<br />
<a href="https://stackoverflow.com/questions/54263057/processing-of-q-object-in-legacy-non-qmake-build/" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/54263057/processing-of-q-object-in-legacy-non-qmake-build/</a><br />
I was able to build on my system locally but when I try and build on the remote build server I am getting these errors:</p>
<pre><code>18-Jan-2019 17:42:57	In file included from udp_server.cpp:2:0:
18-Jan-2019 17:42:57	db.h:45:2: error: ‘uint32_t’ does not name a type
18-Jan-2019 17:42:57	  uint32_t cont_type;
18-Jan-2019 17:42:57	  ^
18-Jan-2019 17:42:57	db.h:46:2: error: ‘uint32_t’ does not name a type
18-Jan-2019 17:42:57	  uint32_t valve;
18-Jan-2019 17:42:57	  ^
18-Jan-2019 17:42:57	db.h:47:2: error: ‘uint32_t’ does not name a type
18-Jan-2019 17:42:57	  uint32_t head;
18-Jan-2019 17:42:57	  ^
18-Jan-2019 17:42:57	db.h:48:2: error: ‘uint32_t’ does not name a type
18-Jan-2019 17:42:57	  uint32_t fill_level;
18-Jan-2019 17:42:57	  ^
18-Jan-2019 17:42:57	udp_server.cpp: In member function ‘void udp_server::processPendingDatagrams()’:
18-Jan-2019 17:42:57	udp_server.cpp:53:15: error: ‘struct fms_data_t’ has no member named ‘cont_type’
18-Jan-2019 17:42:57	           fms.cont_type = jmap["cont_type"].toInt();
18-Jan-2019 17:42:57	               ^
18-Jan-2019 17:42:57	udp_server.cpp:54:15: error: ‘struct fms_data_t’ has no member named ‘valve’
18-Jan-2019 17:42:57	           fms.valve = jmap["valve"].toInt();
18-Jan-2019 17:42:57	               ^
18-Jan-2019 17:42:57	udp_server.cpp:55:15: error: ‘struct fms_data_t’ has no member named ‘head’
18-Jan-2019 17:42:57	           fms.head = jmap["head"].toInt();
18-Jan-2019 17:42:57	               ^
18-Jan-2019 17:42:57	udp_server.cpp:56:15: error: ‘struct fms_data_t’ has no member named ‘fill_level’
18-Jan-2019 17:42:57	           fms.fill_level = jmap["fill_level"].toInt();
18-Jan-2019 17:42:57	               ^
</code></pre>
<p dir="auto">I was wondering what the issue could be. I'm a far more experienced java developer so am not that familiar with qt troubleshooting. The remote system is Ubuntu 16.04 with:</p>
<pre><code>QMake version 3.0
Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu
</code></pre>
<p dir="auto">And my local development environment is ubuntu 18.04</p>
<pre><code>QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu
</code></pre>
<p dir="auto">Is this because of the version mismatch? I'm not actually using qmake so the version of make on both the build server and my local workstation is:</p>
<pre><code>GNU Make 4.1
Built for x86_64-pc-linux-gnu
</code></pre>
<p dir="auto">Any advice is really appreciated!!!</p>
]]></description><link>https://forum.qt.io/post/505779</link><guid isPermaLink="true">https://forum.qt.io/post/505779</guid><dc:creator><![CDATA[James Mark Chan]]></dc:creator><pubDate>Sat, 19 Jan 2019 03:55:17 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Fri, 18 Jan 2019 05:22:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james-mark-chan">@<bdi>James-Mark-Chan</bdi></a> Do you also compile and link generated moc_*.cpp files?<br />
You can do an</p>
<pre><code>#include &lt;moc_myfile.cpp&gt;
</code></pre>
<p dir="auto">at the end of you myfile.cpp</p>
]]></description><link>https://forum.qt.io/post/505578</link><guid isPermaLink="true">https://forum.qt.io/post/505578</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 18 Jan 2019 05:22:36 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Fri, 18 Jan 2019 01:54:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi Dheerendra,</p>
<p dir="auto">If you have a moment for a follow up question. We have a non qmake build and I'm noticing that we get this error when I try to compile with the    Q_OBJECT macro.</p>
<pre><code>obj/udp_server.o: In function `udp_server::udp_server(QObject*)':
udp_server.cpp:(.text+0xc): undefined reference to `vtable for udp_server'
</code></pre>
<p dir="auto">Can I substitute come command line build commands and have the Q_OBJECT macro removed? Can you advise on how to inherit a class from qobject to use signal slots without needing to port our make file to a qmake pro format?</p>
<p dir="auto">Am I just calling moc &lt;myfile.h&gt;; moc &lt;myfile.cpp&gt; and then compiling with the two newly generated files from moc? Or is there more to it than that?</p>
]]></description><link>https://forum.qt.io/post/505571</link><guid isPermaLink="true">https://forum.qt.io/post/505571</guid><dc:creator><![CDATA[James Mark Chan]]></dc:creator><pubDate>Fri, 18 Jan 2019 01:54:18 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Fri, 18 Jan 2019 01:28:16 GMT]]></title><description><![CDATA[<p dir="auto">Thank you! I just happen to stumble by dumb luck across the answer as you were posting. Appreciate your time.</p>
]]></description><link>https://forum.qt.io/post/505567</link><guid isPermaLink="true">https://forum.qt.io/post/505567</guid><dc:creator><![CDATA[James Mark Chan]]></dc:creator><pubDate>Fri, 18 Jan 2019 01:28:16 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Fri, 18 Jan 2019 01:18:32 GMT]]></title><description><![CDATA[<p dir="auto">This was the precise issue and hence requested you to look at previous post.</p>
]]></description><link>https://forum.qt.io/post/505566</link><guid isPermaLink="true">https://forum.qt.io/post/505566</guid><dc:creator><![CDATA[dheerendra]]></dc:creator><pubDate>Fri, 18 Jan 2019 01:18:32 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Fri, 18 Jan 2019 00:02:00 GMT]]></title><description><![CDATA[<p dir="auto">I found my issue. Need to do the connect call and binding after the QCoreApplication a(...) is declared and then follow with the a.exec(). Apparently I was doing it after and it makes a difference.</p>
<pre><code>int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    u_int16_t port = 7777;
    MyUDP *myUDP = new MyUDP(0);
    myUDP-&gt;initSocket(port);

    return a.exec();
}
</code></pre>
]]></description><link>https://forum.qt.io/post/505558</link><guid isPermaLink="true">https://forum.qt.io/post/505558</guid><dc:creator><![CDATA[James Mark Chan]]></dc:creator><pubDate>Fri, 18 Jan 2019 00:02:00 GMT</pubDate></item><item><title><![CDATA[Reply to QUdpSocket readyRead() is not emitted on Thu, 17 Jan 2019 23:33:53 GMT]]></title><description><![CDATA[<p dir="auto">Can u see example[link text](link <a href="https://forum.qt.io/topic/98601/qudpsocket-simple-communication-between-2-qt-applications">https://forum.qt.io/topic/98601/qudpsocket-simple-communication-between-2-qt-applications</a>)here and try</p>
]]></description><link>https://forum.qt.io/post/505555</link><guid isPermaLink="true">https://forum.qt.io/post/505555</guid><dc:creator><![CDATA[dheerendra]]></dc:creator><pubDate>Thu, 17 Jan 2019 23:33:53 GMT</pubDate></item></channel></rss>