<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.programmingexamples.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=Qt%2FCallANormalFunction</id>
		<title>Qt/CallANormalFunction - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=Qt%2FCallANormalFunction"/>
		<link rel="alternate" type="text/html" href="http://www.programmingexamples.net/w/index.php?title=Qt/CallANormalFunction&amp;action=history"/>
		<updated>2026-05-02T10:09:30Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>http://www.programmingexamples.net/w/index.php?title=Qt/CallANormalFunction&amp;diff=339&amp;oldid=prev</id>
		<title>Daviddoria: /* CMakeLists.txt */</title>
		<link rel="alternate" type="text/html" href="http://www.programmingexamples.net/w/index.php?title=Qt/CallANormalFunction&amp;diff=339&amp;oldid=prev"/>
				<updated>2010-11-07T00:25:53Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;CMakeLists.txt&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:25, 7 November 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==CMakeLists.txt==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==CMakeLists.txt==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;text&lt;/del&gt;&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;cmake&lt;/ins&gt;&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cmake_minimum_required(VERSION 2.6)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cmake_minimum_required(VERSION 2.6)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	<entry>
		<id>http://www.programmingexamples.net/w/index.php?title=Qt/CallANormalFunction&amp;diff=282&amp;oldid=prev</id>
		<title>Daviddoria: Created page with '==CallAFunction.cpp== &lt;source lang=&quot;cpp&quot;&gt; #include &lt;qpushbutton.h&gt; #include &lt;qapplication.h&gt;  #include &quot;Foo.h&quot;  void MyFunction() {   std::cout &lt;&lt; &quot;hi&quot; &lt;&lt; std::endl; }  int main(…'</title>
		<link rel="alternate" type="text/html" href="http://www.programmingexamples.net/w/index.php?title=Qt/CallANormalFunction&amp;diff=282&amp;oldid=prev"/>
				<updated>2010-06-29T12:28:03Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;==CallAFunction.cpp== &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; #include &amp;lt;qpushbutton.h&amp;gt; #include &amp;lt;qapplication.h&amp;gt;  #include &amp;quot;Foo.h&amp;quot;  void MyFunction() {   std::cout &amp;lt;&amp;lt; &amp;quot;hi&amp;quot; &amp;lt;&amp;lt; std::endl; }  int main(…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==CallAFunction.cpp==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;qpushbutton.h&amp;gt;&lt;br /&gt;
#include &amp;lt;qapplication.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;Foo.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
void MyFunction()&lt;br /&gt;
{&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; &amp;quot;hi&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
  QApplication a(argc, argv);&lt;br /&gt;
&lt;br /&gt;
  Foo foo;&lt;br /&gt;
  QPushButton myButton( &amp;quot;Click me&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
  QObject::connect(&amp;amp;myButton, SIGNAL(clicked()), &amp;amp;foo, SLOT(bar()));&lt;br /&gt;
&lt;br /&gt;
  myButton.show();&lt;br /&gt;
  return a.exec();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==foo.h==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#ifndef FOO_HPP&lt;br /&gt;
#define FOO_HPP&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;qobject.h&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void MyFunction();&lt;br /&gt;
&lt;br /&gt;
class Foo : public QObject&lt;br /&gt;
{&lt;br /&gt;
  Q_OBJECT&lt;br /&gt;
  public slots:&lt;br /&gt;
    void bar()&lt;br /&gt;
    {&lt;br /&gt;
      MyFunction();&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#endif // FOO_HPP&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CMakeLists.txt==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 2.6)&lt;br /&gt;
&lt;br /&gt;
PROJECT(CallAFunction)&lt;br /&gt;
&lt;br /&gt;
FIND_PACKAGE(Qt4 REQUIRED)&lt;br /&gt;
INCLUDE(${QT_USE_FILE})&lt;br /&gt;
&lt;br /&gt;
QT4_WRAP_CPP(MOCSrcs  Foo.h)&lt;br /&gt;
ADD_EXECUTABLE(CallAFunction CallAFunction.cpp ${MOCSrcs} )&lt;br /&gt;
&lt;br /&gt;
#this does not work&lt;br /&gt;
#ADD_EXECUTABLE(CallAFunction CallAFunction.cpp Foo.h)&lt;br /&gt;
&lt;br /&gt;
TARGET_LINK_LIBRARIES(CallAFunction ${QT_LIBRARIES})&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	</feed>