Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Widgets within a QGraphicsScene are blank

$
0
0
Within a *.ui, I’m using a ClrWidget (sub-classed QColorWidget) i.e., promoted from a QWidget to ClrWidget and there are some issues that I need help with:  _dialog = new QColorDialog(QColor(255,255,255,255));   _dialog->setOptions(QColorDialog::DontUseNativeDialog|QColorDialog::NoButtons);   _dialog->setWindowFlags(Qt::SubWindow); //  _dialog->setVisible(false);   QGraphicsScene *proxyScene = new QGraphicsScene(this);   QGraphicsProxyWidget *proxyWidget = new QGraphicsProxyWidget();   proxyWidget->setWidget(_dialog);   proxyScene->addItem(proxyWidget);   proxyScene->setSceneRect(proxyWidget->geometry());     setScene(proxyScene);   setMinimumSize(_dialog->size());   setMaximumSize(_dialog->size());   setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);   setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);   setFrameStyle(QFrame::NoFrame); 1. The QColorDialog is not visible when the above piece of code is executed i.e., it remains blank – Are there any specifics that have to be set to enable the widgets are shown within a QGraphicsScene? 2. if I don’t have the statement “_dialog->setVisible(false)”, on application startup I have a “Select Color” modal dialog which pops-up. How do I avoid the dialog from popping-up?

Viewing all articles
Browse latest Browse all 18427

Trending Articles