[quote name='Seaßourne' timestamp='1296635649' post='4768376']
I see a lot of things wrong with your code.
I'd appreciate it if you could point out my errors to me. I in no way claim to be an Ogre / Qt expert, and it is entirely possible that I'm doing things completely wrong.
[/quote]
1. You don't need boost::noncopyable as you can use: http://doc.qt.nokia.com/4.7/qobject.html#Q_DISABLE_COPY
class OrgeWidget {
private:
Q_DISABLE_COPY(OrgeWidget)
};
2. Your constructor should be QtOgreWidget(QWidget* parent = 0); not with reference and it should be the last parameter with exactly QWidget* parent = 0 (Qt uses 0 instead of NULL)
3. Qt already has macros for assertion Q_ASSERT (plain assert) and Q_ASSERT_X (with a message)
http://doc.qt.nokia....l.html#Q_ASSERT
http://doc.qt.nokia....html#Q_ASSERT_X
4. You should be using QString instead of std::ostringstream to convert data like numbers, appending, etc.
QString::number(20) == "20" etc.
QString("Foo %1 and %2").arg("foo", "bar"); // "Foo foo and bar"
http://doc.qt.nokia....st/qstring.html
5. Qt already has it's own containers, QList, QVector, QHash, QMap, QMultiMap, QMultiHash, QLinkedList, etc
6. Qt already has stream classes QTextStream and QDataStream with great unicode support. Maybe should convert to it.
7. Not sure what TXT_() is and if thats for translating like L"" etc are. Then there is tr() for it which you can use Linguist with to translate.
8. You shouldn't prefix classes with Qt as it's reserved naming convention same with QFoo.