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. Avoiding widgets to overlays the corner widget place of the QScrollArea
Forum Updated to NodeBB v4.3 + New Features

Avoiding widgets to overlays the corner widget place of the QScrollArea

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 384 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.
  • F Offline
    F Offline
    floris
    wrote on last edited by
    #1

    Currently I have an editor which is a custom table widget, which places a QTextEdit on top of the table widget. I move this textedit over the table widget, to make sure that it also is on the correct position when moving the scrollbars.
    The table is made out of a QAbstractScrollArea and contains a custom widget on the scrollarea.

    Because of the QTextEdit, I want to make the textedit the size of the whole text, otherwise the text is placed on the next line. When I'm moving the edit to the height of the horizontal scrollbar, I see that in the cornerwidget area of the scrollarea, the textedit is drawn.

    How could I fixed that nothing can be drawn in that area?

    VRoninV 1 Reply Last reply
    0
    • F floris

      Currently I have an editor which is a custom table widget, which places a QTextEdit on top of the table widget. I move this textedit over the table widget, to make sure that it also is on the correct position when moving the scrollbars.
      The table is made out of a QAbstractScrollArea and contains a custom widget on the scrollarea.

      Because of the QTextEdit, I want to make the textedit the size of the whole text, otherwise the text is placed on the next line. When I'm moving the edit to the height of the horizontal scrollbar, I see that in the cornerwidget area of the scrollarea, the textedit is drawn.

      How could I fixed that nothing can be drawn in that area?

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      @floris said in Avoiding widgets to overlays the corner widget place of the QScrollArea:

      I have an editor which is a custom table widget, which places a QTextEdit on top of the table widget

      Why? What are you doing? Why can't you just use a delegate?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • F Offline
        F Offline
        floris
        wrote on last edited by floris
        #3

        The structure of the widget was already in this way, but the code was converted from Qt3 to Qt5. It seems that in the Qt3 QScrollView it wasn't possible to move a widget such that a part of it was displayed on the corner widget place.

        In the Qt5 QAbstractScrollArea it's possible, and I would like to not let the textedit draw this area. Do you have any suggestions?TextEditIssue.png

        P.s. it's not a QTableWidget/QTableView, it's a completely custom widget.

        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