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. Layout problem
QtWS25 Last Chance

Layout problem

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

    Hello I am using Grid Layout in one of my forms. In that form I have QCustomPlot widget. The problem is that when I run the code, it gets something different than the layout. And of course I cannot move it by using move() command...
    That is how it looks line in Design window:
    1.png
    Notice that there is no space between the selected widget and the QTableWidget.

    When I run it:

    2.png
    Now there is a a space between QTableWidget and the Graph, that comes from nowhere. Also eventhough I use layout and my custom widget is inside of that layout, still the CustomWidget (Graph) is cut from half. How can I solve that?

    jsulmJ 1 Reply Last reply
    0
    • G GunkutA

      Hello I am using Grid Layout in one of my forms. In that form I have QCustomPlot widget. The problem is that when I run the code, it gets something different than the layout. And of course I cannot move it by using move() command...
      That is how it looks line in Design window:
      1.png
      Notice that there is no space between the selected widget and the QTableWidget.

      When I run it:

      2.png
      Now there is a a space between QTableWidget and the Graph, that comes from nowhere. Also eventhough I use layout and my custom widget is inside of that layout, still the CustomWidget (Graph) is cut from half. How can I solve that?

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

      @GunkutA said in Layout problem:

      How can I solve that?

      Please show how you put your custom widget into that layout.

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

      G 1 Reply Last reply
      0
      • jsulmJ jsulm

        @GunkutA said in Layout problem:

        How can I solve that?

        Please show how you put your custom widget into that layout.

        G Offline
        G Offline
        GunkutA
        wrote on last edited by
        #3

        @jsulm Probably I am answering in the wrong way but, I directly created a QWidget in GUI and then promoted it to QCustomPlot widget. Again by using user interface window. Was that what you asked for? Because I didn't put it in the code.

        jsulmJ 1 Reply Last reply
        0
        • G GunkutA

          @jsulm Probably I am answering in the wrong way but, I directly created a QWidget in GUI and then promoted it to QCustomPlot widget. Again by using user interface window. Was that what you asked for? Because I didn't put it in the code.

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

          @GunkutA OK. What is your custom widget doing? Do you paint there?

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

          G 1 Reply Last reply
          0
          • jsulmJ jsulm

            @GunkutA OK. What is your custom widget doing? Do you paint there?

            G Offline
            G Offline
            GunkutA
            wrote on last edited by
            #5

            @jsulm That is for plotting. That is a premade plotting library for creating graphs. Yes it uses paint events and QCPPainter.

            jsulmJ 1 Reply Last reply
            0
            • G GunkutA

              @jsulm That is for plotting. That is a premade plotting library for creating graphs. Yes it uses paint events and QCPPainter.

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

              @GunkutA You would have to provide more information about your custom widget, else only guessing is possible.

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

              G 1 Reply Last reply
              0
              • jsulmJ jsulm

                @GunkutA You would have to provide more information about your custom widget, else only guessing is possible.

                G Offline
                G Offline
                GunkutA
                wrote on last edited by
                #7

                @jsulm Well that's this one: QCustomPlot](https://www.qcustomplot.com/#:~:text=QCustomPlot is a Qt C%2B%2B widget for plotting and data visualization.&text=QCustomPlot is the solution for,use QCP in free software!)

                I don't have adequate information about its content. There are more than 30.000 lines of code in it. But what I cannot understand is independent from the widget and its content, in the UI its borders and boundaries are visible. There is also a layout. Isn't it supposed to stay inside of its boundaries which are clear in the UI?

                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