On Thursday 27 September 2007, Mike Tammerman wrote:
> I think QColorDialog cannot be instantiated or subclassed from PyQt. I
> don't really know if the same behaviour exists in C++. I looked at the
> source code of the QColorDialog::getColor function and it is
>
> QColor QColorDialog::getColor(const QColor& initial, QWidget *parent)
> {
>     QColorDialog *dlg = new QColorDialog(parent, true);  //modal
>     dlg->setWindowTitle(QColorDialog::tr("Select color"));
>     dlg->setColor(initial);
>     dlg->selectColor(initial);
>     int resultCode = dlg->exec();
>     QColor result;
>     if (resultCode == QDialog::Accepted)
>         result = dlg->color();
>     delete dlg;
>     return result;
> }
>
> Looking at the code, I can see that, it can be instantiated from C++.

The ctor isn't documented, so it's assumed that it's not part of the public 
API.

Phil
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to