Sandbox: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<code><br /> #include &lt;QApplication&amp;gt;<br /> #include &lt;QPushButton&amp;gt;
== Welcome to the Sandbox ==
Here you can try out the [http://www.mediawiki.org/wiki/Help:Formatting MediaWiki Markup] and our [[Special:AllPages/Template:|Qt Wiki Templates]].


int main(int argc, char *argv[])<br /> {<br /> QApplication app(argc, argv);
Info about this Wiki:


QPushButton hello(&quot;Hello world!&quot;);<br /> hello.resize(100, 30);
{|
| '''Site Name:''' || {{SITENAME}}
|-
| '''Server Name:''' || {{SERVERNAME}}
|}


hello.show();<br /> return app.exec&amp;amp;#40;&amp;#41;;<br /> }<br /></code>
Info about this page:
 
{|
| '''Page Name:''' || {{PAGENAME}}
|}
 
Localisation Test: [[Sandbox/de]]
 
Testing the wiki after update.
 
==Code Blocks Formatting==
===CPP===
<code lang="cpp">
#include <test.h>
#define CONSTANTVALUE 9
if(x==true)
{
  QList< QList< QStringList > > multiStringList;
  callSomeOtherFunction();
  switch(someVar)
  {
    default:
    case CONSTANTVALUE:
    {
      for(int i=0;i<CONSTANTVALUE;i++)
      {
        qDebug()<<"Text: "<< i;
      }
    }
      break;
  }
}
 
class Widget {
...
private:
  Rect m_geometry;
  String m_stylesheet; // NEW in WidgetLib 1.1
};
 
class Label : public Widget {
public:
...
  String text() const { return m_text; }
 
private:
  String m_text;
  };
</code>
 
===CPP-QT===
<code lang="cpp-qt">
#include <test.h>
#define CONSTANTVALUE 9
if(x==true)
{
  QList< QList< QStringList > > multiStringList;
  callSomeOtherFunction();
  switch(someVar)
  {
    default:
    case CONSTANTVALUE:
    {
      for(int i=0;i<CONSTANTVALUE;i++)
      {
        qDebug()<<"Text: "<< i;
      }
    }
      break;
  }
}
 
class Widget {
...
private:
  Rect m_geometry;
  String m_stylesheet; // NEW in WidgetLib 1.1
};
 
class Label : public Widget {
public:
...
  String text() const { return m_text; }
 
private:
  String m_text;
  };
</code>
 
===None===
<code>
#include <test.h>
#define CONSTANTVALUE 9
if(x==true)
{
  QList< QList< QStringList > > multiStringList;
  callSomeOtherFunction();
  switch(someVar)
  {
    default:
    case CONSTANTVALUE:
    {
      for(int i=0;i<CONSTANTVALUE;i++)
      {
        qDebug()<<"Text: "<< i;
      }
    }
      break;
  }
}
 
class Widget {
...
private:
  Rect m_geometry;
  String m_stylesheet; // NEW in WidgetLib 1.1
};
 
class Label : public Widget {
public:
...
  String text() const { return m_text; }
 
private:
  String m_text;
  };
</code>
 
===Error===
<code lang="unknown">
#include <test.h>
#define CONSTANTVALUE 9
if(x==true)
{
  QList< QList< QStringList > > multiStringList;
  callSomeOtherFunction();
  switch(someVar)
  {
    default:
    case CONSTANTVALUE:
    {
      for(int i=0;i<CONSTANTVALUE;i++)
      {
        qDebug()<<"Text: "<< i;
      }
    }
      break;
  }
}
 
class Widget {
...
private:
  Rect m_geometry;
  String m_stylesheet; // NEW in WidgetLib 1.1
};
 
class Label : public Widget {
public:
...
  String text() const { return m_text; }
 
private:
  String m_text;
  };
</code>
 
Testing Wiki after update. Even '''more''' testing with the visual editor.

Latest revision as of 09:01, 8 October 2018

Welcome to the Sandbox

Here you can try out the MediaWiki Markup and our Qt Wiki Templates.

Info about this Wiki:

Site Name: Qt Wiki
Server Name: wiki.qt.io

Info about this page:

Page Name: Sandbox

Localisation Test: Sandbox/de

Testing the wiki after update.

Code Blocks Formatting

CPP

#include <test.h>
#define CONSTANTVALUE 9
if(x==true)
{
  QList< QList< QStringList > > multiStringList;
  callSomeOtherFunction();
  switch(someVar)
  {
    default:
    case CONSTANTVALUE:
    {
      for(int i=0;i<CONSTANTVALUE;i++)
      {
        qDebug()<<"Text: "<< i;
      }
    }
      break;
  }
}

class Widget {
 ...
 private:
  Rect m_geometry;
  String m_stylesheet; // NEW in WidgetLib 1.1
};

class Label : public Widget {
 public:
 ...
  String text() const { return m_text; }

 private:
  String m_text;
  };

CPP-QT

#include <test.h>
#define CONSTANTVALUE 9
if(x==true)
{
  QList< QList< QStringList > > multiStringList;
  callSomeOtherFunction();
  switch(someVar)
  {
    default:
    case CONSTANTVALUE:
    {
      for(int i=0;i<CONSTANTVALUE;i++)
      {
        qDebug()<<"Text: "<< i;
      }
    }
      break;
  }
}

class Widget {
 ...
 private:
  Rect m_geometry;
  String m_stylesheet; // NEW in WidgetLib 1.1
};

class Label : public Widget {
 public:
 ...
  String text() const { return m_text; }

 private:
  String m_text;
  };

None

#include <test.h>
#define CONSTANTVALUE 9
if(x==true)
{
  QList< QList< QStringList > > multiStringList;
  callSomeOtherFunction();
  switch(someVar)
  {
    default:
    case CONSTANTVALUE:
    {
      for(int i=0;i<CONSTANTVALUE;i++)
      {
        qDebug()<<"Text: "<< i;
      }
    }
      break;
  }
}

class Widget {
 ...
 private:
  Rect m_geometry;
  String m_stylesheet; // NEW in WidgetLib 1.1
};

class Label : public Widget {
 public:
 ...
  String text() const { return m_text; }

 private:
  String m_text;
  };

Error

#include <test.h>
#define CONSTANTVALUE 9
if(x==true)
{
  QList< QList< QStringList > > multiStringList;
  callSomeOtherFunction();
  switch(someVar)
  {
    default:
    case CONSTANTVALUE:
    {
      for(int i=0;i<CONSTANTVALUE;i++)
      {
        qDebug()<<"Text: "<< i;
      }
    }
      break;
  }
}

class Widget {
 ...
 private:
  Rect m_geometry;
  String m_stylesheet; // NEW in WidgetLib 1.1
};

class Label : public Widget {
 public:
 ...
  String text() const { return m_text; }

 private:
  String m_text;
  };

Testing Wiki after update. Even more testing with the visual editor.