Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:30:51+00:00 2026-06-16T04:30:51+00:00

I am rather new to desktop GUI development. I am trying to get a

  • 0

I am rather new to desktop GUI development.

I am trying to get a frame with 3 parallel vertical panels, all expanding vertically to fill the window.

I want the first two panels not to be flexible but to have a fixed size.

Ex:

 Fixed W.
|========|
############################ 
#    #    #                # ^
#Fix.#Fix.#                # |
#|--|#|--|# <--Flexible--> # Flexible vertically all 3 panels.
#    #    #                # |
#    #    #                # v
############################

How can I obtain this layout? I am tried Grid, Vertical, Horizontal but I think I got it all spaghetti-like and confused.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:30:52+00:00Added an answer on June 16, 2026 at 4:30 am

    You need a

    QHBoxLayout
    

    You just have to set a fixed width for your fixed widgets (in the left).

    Here is a complete working example in C++:

    #include <QApplication>
    #include <QtGui>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        QFrame* w1 = new QFrame;
        w1->setFixedWidth(100);
        w1->setStyleSheet("background-color: red");
    
        QFrame* w2 = new QFrame;
        w2->setFixedWidth(100);
        w2->setStyleSheet("background-color: blue");
    
        QFrame* w3 = new QFrame;
        w3->setStyleSheet("background-color: green");
        w3->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    
        QHBoxLayout* layout = new QHBoxLayout;
    
        layout->addWidget(w1);
        layout->addWidget(w2);
        layout->addWidget(w3);
    
        QWidget* app = new QWidget;
        app->setLayout(layout);
        app->show();
        return a.exec();
    }
    

    And the screenshot:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Rather new to trying to get OpenGL ES working on the iPhone, but I've
I'm rather new to C++ and I'm trying to understand the code over on
I'm rather new to Backbone.js development, and have run into a bit of a
I'm rather new to jQuery and I'm trying to make a cool little menu
Rather new to REST and Jersey, and I'm trying out some basic examples. I've
I'm rather new to the ASP.net MVC world and I'm trying to figure out
I'm still rather new to the c# programming, so I was trying to make
Being rather new to pure functional programming idiom, I can't get how to implement
I'm rather new to web development so I'm using MVC with ASP.NET and I've
I'm rather new to ASP.NET and SQL, so I'm having a tough time trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.