SetHorizontalScrollBar deletes the scrollbar instead of the former scrollbar and has no effect in my QGraphicsview



  • I have added a new Qt Designer Form Class by Template QTabWidget and in the center of it I have placed a QGraphicsview to which I would like to replace the horizontal and vertical ScrollBars with other scrollbars in my layout.

    I have highlighted the QGraphicsview and scrollbars in the image below!http://tech-it.gr/Screenshot1.JPG(Layout Screenshot)!

    The problem is that the following command line, instead of replacing the horizontal scroll bar with the one I have in my layout, it deletes my horizontalscrollbar.
    @this->ui->graphicsView->setHorizontalScrollBar(this->ui->horizontalScrollBar);@

    Could anyone tell me why could this be happening?

    I have uploaded the project zip here "Your text to link here...":http://tech-it.gr/example.zip


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.