Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4432

QGraphicsProxyWidget::setWindowFlags(Qt::Tool) looks the same as Qt::Window

    XMLWordPrintable

Details

    Description

      #include <QtGui>
      
      int main( int argc , char *argv[] )
      {
          QApplication app(argc, argv) ;
          QGraphicsScene * scene = new QGraphicsScene() ;
      
          QMainWindow *mainWindow = new QMainWindow();
         
         QGraphicsEllipseItem *ball = scene->addEllipse(100,150,20,20,QPen(Qt::red),QBrush(Qt::darkGreen));
         ball->setFlag(QGraphicsItem::ItemIsMovable, true);
      
         QGraphicsProxyWidget *gpw = scene->addWidget(mainWindow);
         gpw->setGeometry( QRect(100 , 10 , 150 , 100 ));
      
      //   gpw->setWindowFlags(Qt::Window); //these two look the same
         gpw->setWindowFlags(Qt::Tool);
      
         gpw->setFlag(QGraphicsItem::ItemIsMovable,true);
      
         QGraphicsView *view = new QGraphicsView(scene);
         view->setBackgroundBrush(Qt::darkGray);
         view->show();
         return app.exec() ;
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            dettman Dean Dettman (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes