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. QGraphicsScene(Item) QDockWidget change szie.

QGraphicsScene(Item) QDockWidget change szie.

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 672 Views
  • 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.
  • P Offline
    P Offline
    Pada_
    wrote on last edited by
    #1

    QGraphicsScene has QGraphicsItems.

    When you select these items with the mouse, the QDockWidget displays the x, y coordinate values ​​of the selected item and information such as the width and height.

    However, since the information provided by each item is different, the size of the DockWidget changes with each click of the item.

    So when you press an item, one half of the screen is covered and one is too small.

    Is there any way I can adjust the DockWidget size to the same size, but not the Fix size? Thank you

    1 Reply Last reply
    0
    • YunusY Offline
      YunusY Offline
      Yunus
      wrote on last edited by
      #2

      @Pada_ Im sure you tried this but didnt it work?

      QWidget::resize(int w, int h)

      P 1 Reply Last reply
      0
      • YunusY Yunus

        @Pada_ Im sure you tried this but didnt it work?

        QWidget::resize(int w, int h)

        P Offline
        P Offline
        Pada_
        wrote on last edited by
        #3

        @Yunus

        I take the time to start a new Qt forum and add a comment.

        I've tried it. It does not change.

        If the user moves the size of the DcokWidget with the mouse, the size will not change from item to item.

        jsulmJ 1 Reply Last reply
        0
        • P Pada_

          @Yunus

          I take the time to start a new Qt forum and add a comment.

          I've tried it. It does not change.

          If the user moves the size of the DcokWidget with the mouse, the size will not change from item to item.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Pada_ What about https://doc.qt.io/qt-5/qwidget.html#setMaximumSize-1 ?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • YunusY Offline
            YunusY Offline
            Yunus
            wrote on last edited by
            #5

            @Pada_ @jsulm yeah the same issue is also in here. it should work:

            https://stackoverflow.com/questions/2722939/c-resize-a-docked-qt-qdockwidget-programmatically

            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