Sandbox: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
<code><br /> #include &lt;QApplication&amp;gt;<br /> #include &lt;QPushButton&amp;gt;
<code>
#include <QApplication>
#include <QPushButton>


int main(int argc, char *argv[])<br /> {<br /> QApplication app(argc, argv);
int main(int argc, char *argv[])
{
QApplication app(argc, argv);


QPushButton hello(&quot;Hello world!&quot;);<br /> hello.resize(100, 30);
QPushButton hello("Hello world!");
hello.resize(100, 30);


hello.show();<br /> return app.exec&amp;amp;#40;&amp;#41;;<br /> }<br /></code>
hello.show();
return app.exec();
}
</code>

Revision as of 13:34, 25 February 2015

 #include <QApplication>
 #include <QPushButton>

int main(int argc, char *argv[])
 {
 QApplication app(argc, argv);

QPushButton hello("Hello world!");
 hello.resize(100, 30);

hello.show();
 return app.exec();
 }