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. Any Layout dissapear all widgets
Forum Updated to NodeBB v4.3 + New Features

Any Layout dissapear all widgets

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 3 Posters 2.3k Views 2 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.
  • mrjjM mrjj

    @LCorona
    Hmm it sounds right.
    Mine can scroll even before i put widget in.

    But for you , the scrollbars are disabled ?

    alt text

    also, the scrollareawidgetcontents has small red symbol to show no layout assigned, right ?

    alt text

    L Offline
    L Offline
    LCorona
    wrote on last edited by
    #11

    @mrjj
    The scrollbars are not disabled, yes, there is a red icon on scrollareawidgetcontents.
    Also the ui designer made someting weird, after set the minimumheight of widgets, if again resize the scrollarea to see the hiden widgets, now cant see anything, all widgets are invisible , one is a tablewiget that has a part hidden, this wiget appears cut, the remaining part appears invisible too.

    weird.jpg

    mrjjM 1 Reply Last reply
    0
    • L LCorona

      @mrjj
      The scrollbars are not disabled, yes, there is a red icon on scrollareawidgetcontents.
      Also the ui designer made someting weird, after set the minimumheight of widgets, if again resize the scrollarea to see the hiden widgets, now cant see anything, all widgets are invisible , one is a tablewiget that has a part hidden, this wiget appears cut, the remaining part appears invisible too.

      weird.jpg

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #12

      @LCorona
      Hi
      When we use ScrollArea without a layout we dont need to set any minimum on the widgets are they should just float
      around where we place them and not alter position or size.

      Did you have them in some layout or anything like that or is it just like 10 custom plots?

      Im not sure what happened to it. Sorry it exploded.

      Could you maybe paste the ui file to
      https://paste.ofcode.org/

      So i could try have a look ?

      I assume its just a normal MainWindow UI with some widgets promoted to customplots ?

      L 1 Reply Last reply
      0
      • L Offline
        L Offline
        LCorona
        wrote on last edited by
        #13

        Maybe I forgot something very important, all the widgets inside scrollarea except the tablewiget are promoted (I dont know is this is consider as a custom widget), maybe this is caused the problems.

        mrjjM 1 Reply Last reply
        0
        • L LCorona

          Maybe I forgot something very important, all the widgets inside scrollarea except the tablewiget are promoted (I dont know is this is consider as a custom widget), maybe this is caused the problems.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #14

          @LCorona
          Hi
          I doubt that as i use promotion all the time and its just a clever trick from Creator.
          Like a place holder so in Designer they are just plain Widgets but in the code generated
          they are QCustomPlot types. ( well QCustomPlot is a custom widget )

          Im not sure what could have caused this as it seems there is no layout so the widgets should not jump around at all.

          Hence i wanted to see the inside of the UI file (its XML) and open in Designer to see if I can spot anything.

          1 Reply Last reply
          0
          • mrjjM mrjj

            @LCorona
            Hi
            When we use ScrollArea without a layout we dont need to set any minimum on the widgets are they should just float
            around where we place them and not alter position or size.

            Did you have them in some layout or anything like that or is it just like 10 custom plots?

            Im not sure what happened to it. Sorry it exploded.

            Could you maybe paste the ui file to
            https://paste.ofcode.org/

            So i could try have a look ?

            I assume its just a normal MainWindow UI with some widgets promoted to customplots ?

            L Offline
            L Offline
            LCorona
            wrote on last edited by
            #15

            @mrjj
            Sure, there is my code https://paste.ofcode.org/5HQYLEtKiY5jveeJhuF98b

            The form have 48 promoted widgets of customPlot class, and a tablewiget, yes is a normal window

            mrjjM 1 Reply Last reply
            1
            • L LCorona

              @mrjj
              Sure, there is my code https://paste.ofcode.org/5HQYLEtKiY5jveeJhuF98b

              The form have 48 promoted widgets of customPlot class, and a tablewiget, yes is a normal window

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #16

              @LCorona
              Hi
              Working fine.
              Your TableWidget has a huge Height. That is on purpose ?

              But your CustomPlots are just 51 in height ?
              What was the plan for each.

              I think i get design.
              Table widget with one col to the side, very high so that it will follow all the customs plot down ?

              But how big is the plan for each CustomPlot ?

              51 pixels is kinda small but did you mean to have them this small ?

              Update:
              Found it
              Your scrollAreaWidgetContents did nto have min size set .
              if i set say 2000x 2000 it all works fine
              alt text

              alt text

              Can i ask why you put them in manually instead of simply adding them using a loop since you want that many ?
              (by loop i mean in code)

              ps. i added col to tablewidget to to see if it was ok. and it was. it just look slightly odd with only one col.
              (you can get col to strech whole table width if you want)

              L 1 Reply Last reply
              1
              • mrjjM mrjj

                @LCorona
                Hi
                Working fine.
                Your TableWidget has a huge Height. That is on purpose ?

                But your CustomPlots are just 51 in height ?
                What was the plan for each.

                I think i get design.
                Table widget with one col to the side, very high so that it will follow all the customs plot down ?

                But how big is the plan for each CustomPlot ?

                51 pixels is kinda small but did you mean to have them this small ?

                Update:
                Found it
                Your scrollAreaWidgetContents did nto have min size set .
                if i set say 2000x 2000 it all works fine
                alt text

                alt text

                Can i ask why you put them in manually instead of simply adding them using a loop since you want that many ?
                (by loop i mean in code)

                ps. i added col to tablewidget to to see if it was ok. and it was. it just look slightly odd with only one col.
                (you can get col to strech whole table width if you want)

                L Offline
                L Offline
                LCorona
                wrote on last edited by
                #17

                @mrjj
                I build a logic signal analizer, the tablewidget is for manage the channels leyends, put a colorpicker for the plot, and other controls, I choose a tablewidget because want a dragdrop functionality for channels and this widget already implemented.

                Each customplot is for made a chart of digital signals, these customwidget is the only free thing I found for made a chart, in fact now I already draw successfully many digital signals.

                Other customwidget is for made the timeline control.

                The thing not work is the scrolling.

                I put all the widgets in the form becasuse I read in forums that is not possible create a promote widgets programatically.

                Wow, you found it!!!, I will test it.

                mrjjM 1 Reply Last reply
                0
                • L LCorona

                  @mrjj
                  I build a logic signal analizer, the tablewidget is for manage the channels leyends, put a colorpicker for the plot, and other controls, I choose a tablewidget because want a dragdrop functionality for channels and this widget already implemented.

                  Each customplot is for made a chart of digital signals, these customwidget is the only free thing I found for made a chart, in fact now I already draw successfully many digital signals.

                  Other customwidget is for made the timeline control.

                  The thing not work is the scrolling.

                  I put all the widgets in the form becasuse I read in forums that is not possible create a promote widgets programatically.

                  Wow, you found it!!!, I will test it.

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #18

                  @LCorona
                  Ok, sounds fine.

                  The only thing to remember that the minimum size you set for
                  scrollAreaWidgetContents, is the max area where you can place other widgets. So if you hit the bottom, you must extend it.

                  Did you want each CustomPlot to be only 51 height?

                  L 1 Reply Last reply
                  0
                  • mrjjM mrjj

                    @LCorona
                    Ok, sounds fine.

                    The only thing to remember that the minimum size you set for
                    scrollAreaWidgetContents, is the max area where you can place other widgets. So if you hit the bottom, you must extend it.

                    Did you want each CustomPlot to be only 51 height?

                    L Offline
                    L Offline
                    LCorona
                    wrote on last edited by
                    #19

                    @mrjj
                    The only thing to remember that the minimum size you set for
                    scrollAreaWidgetContents, is the max area where you can place other widgets. So if you hit the bottom, you must extend it. OK

                    Did you want each CustomPlot to be only 51 height? Yes, for now is enough, basically, the interest in the signals are the times of the signal enter a flank, in fact, the plot is made only with binary numbers for Y axe, X axe is continuos in time.

                    Here there is a view of some of generated plots with the actual code.

                    analizer.jpg

                    mrjjM 1 Reply Last reply
                    1
                    • L LCorona

                      @mrjj
                      The only thing to remember that the minimum size you set for
                      scrollAreaWidgetContents, is the max area where you can place other widgets. So if you hit the bottom, you must extend it. OK

                      Did you want each CustomPlot to be only 51 height? Yes, for now is enough, basically, the interest in the signals are the times of the signal enter a flank, in fact, the plot is made only with binary numbers for Y axe, X axe is continuos in time.

                      Here there is a view of some of generated plots with the actual code.

                      analizer.jpg

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #20

                      @LCorona
                      That's looks cool.

                      Ok so all make sense.

                      Does scrolling work for you now ?

                      Your scrollabar dont look that big

                      L 2 Replies Last reply
                      1
                      • mrjjM mrjj

                        @LCorona
                        That's looks cool.

                        Ok so all make sense.

                        Does scrolling work for you now ?

                        Your scrollabar dont look that big

                        L Offline
                        L Offline
                        LCorona
                        wrote on last edited by
                        #21

                        @mrjj
                        The scroll bar appears enabled but because I resize the scrollarea to a small size than the one had before set of the minimal size of widgets, but becone disabled again if set the size at original height, also not show the hidden wigets, Im not implemented the solution yet, I have to go for lunch, but I come back.

                        1 Reply Last reply
                        0
                        • mrjjM mrjj

                          @LCorona
                          That's looks cool.

                          Ok so all make sense.

                          Does scrolling work for you now ?

                          Your scrollabar dont look that big

                          L Offline
                          L Offline
                          LCorona
                          wrote on last edited by LCorona
                          #22

                          @mrjj
                          Perfect, I already test it, works excellent!!!, you are awesome, problem resolved, Thank you.

                          goodsignals.jpg

                          1 Reply Last reply
                          1

                          • Login

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