Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Custom widget, looks like scroll bar on QGraphicsView
Qt 6.11 is out! See what's new in the release blog

Custom widget, looks like scroll bar on QGraphicsView

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi all.

    I have a problem. I have an Inheriter of QGraphicsScene and QGraphicsView displaing it.
    I want to display a widget which looks like scroll bar, i mean having arrow buttons, being always in the bottom/side of the scene.
    But if i add my custom widget to a view by setVerticalScrollBar() I lost control on it. I can't set it enabled, when I need, etc.

    What I need to do?

    Edit: fixed typo in title; mlong

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      If you didn't understand, what I am taling about, write it please.

      1 Reply Last reply
      0
      • ToniyT Offline
        ToniyT Offline
        Toniy
        wrote on last edited by Toniy
        #3

        If you need this scrollbar-like widget to be part of your scene, you may use one of two options to place an instance of QScrollBar on it:

        • use QGraphicsProxyWidget to wrap your scrollbar for adding to scene and place it on scene to necessary place with QGraphicsScene::addItem()

        • use QGraphicsScene::addWidget() with your QScrollBar instance as argument.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved