Changing from ScrollBar to FixedWidth



  • Hello, I am a new Qt user, and am looking for some help on a legacy project I have taken over. I want to remove scroll bar from a grid layout, having two columns instead.

    Currently, I have a window with a page in it that scrolls vertically. I want to remove the scroll bar and place all the extra information that would previously be scrolled to, in another column right next to the first.

    I am currently using a QGridLayout where the height of each row will take the size of the largest QGroupBox.

    Thank you for your time, any help or ideas would be greatly appreciated.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you maybe post a picture of what you have and one of what you want to have ?

    Your current situation isn't really clear.



  • @SGaist

    I want something like this

    I want something like this

    but currently, I have something like this

    alt text

    Thank you


  • Lifetime Qt Champion

    Do you really need group boxes ?

    You could simply put two QListView/Widget side by side.



  • @SGaist I have names of the groups so I guess the photo looks a bit more like this than what I posted previously.

    alt text

    I tried changing the groupBox to a QListView and it didn't seem to do anything, yet I am betting it is just due to the nature of the code.

    FYI, there are around 2,000 lines of code in this project....with 0 comments. I am having some trouble locating exactly what I am supposed to change, but I will keep at it.


  • Lifetime Qt Champion

    Ok, the you could simply use a QHBoxLayout and put the QGroupBox on beside the other.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.