Sandbox: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
Line 41: Line 41:
   }
   }
}
}
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>
</code>


Line 64: Line 80:
   }
   }
}
}
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>
</code>


Line 87: Line 119:
   }
   }
}
}
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>
</code>


Line 110: Line 158:
   }
   }
}
}
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>
</code>

Revision as of 13:45, 7 July 2015

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


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;
  };