int main(int argc, char *argv[]) { QApplication app(argc, argv); ImageEditor imageEditor; imageEditor.setCaption(QObject::tr("Image Editor")); imageEditor.setImage(QImage::fromMimeSource("mouse.png")); app.setMainWidget(&imageEditor); imageEditor.show(); return app.exec(); }
int main(int argc, char *argv[]) { QApplication app(argc, argv); #if 0 // Translator // English to Japanese QTranslator trans; trans.load("ja.qm", qApp->applicationDirPath()); app.installTranslator(&trans); #endif ImageEditor imageEditor; #if defined(Q_OS_SYMBIAN) imageViweer.showMaximized(); #else imageEditor.show(); #endif return app.exec(); }
void ImagePropItem::setPropertyEditorData(QWidget *propertyEditor, const QModelIndex &) const { ImageEditor *editor =qobject_cast<ImageEditor*>(propertyEditor); editor->setImage(propertyValue().value<QImage>()); }