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

  • Home
  • SEARCH
  • 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 6128731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:39:36+00:00 2026-05-23T16:39:36+00:00

I’m new to Qt development, am writing a level editor for a game I’m

  • 0

I’m new to Qt development, am writing a level editor for a game I’m working on, and I’m having trouble with Layouts in the Designer.

Here’s what I want it to look like:

(I don’t have enough rep to post images, here’s a link:)
http://img855.imageshack.us/img855/6474/editori.jpg

There’s obviously going to be more buttons and things on the right, and stuff actually showing up inside the OpenGL canvas.

So I have two specific questions:

1) How do I set it up so that if the user re-sizes the window, the application re-sizes its contents appropriately? I can get close to what I want with by putting the buttons into a Vertical layout, then putting that and the OpenGLCanvasinto a Splitter layout, but that results in the canvas being the size width as the buttons, as opposed to the buttons being fixed to say, the right-most 100 pixels of the screen.

2) Is there an easy way to allow scrolling the canvas? The size of the level could potentially be much bigger than what can fit on the screen, so if that’s the case, I want to add horizontal and vertical scrollbars to the canvas. (if the level is too big or if the user makes the window small enough so it no longer fits. In the latter case, the scrollbars should only appear if it actually doesn’t fit). Is there an easy way to do this, or do I have to do everything manually?

Thanks!

  • 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-05-23T16:39:37+00:00Added an answer on May 23, 2026 at 4:39 pm

    If the contents are not being resized correctly, it sounds as though you may not have set a top-level layout. Also, are you sure you want to use a Splitter layout? I’m not sure what benefit that would give you in this case and it would make it possible to hide the buttons by resizing the canvas over them. Maybe you have a reason to prefer this though. Regardless, in Designer, I am able to create something similar to what you’ve shown that resizes correctly by:

    • Adding the buttons, then grouping them into a Vertical layout.
    • Adding the canvas.
    • Then selecting the form (by either right-clicking somewhere on the form unoccupied by another widget or by right-clicking on Form in the Object Inspector) and selecting Layout->Lay Out Horizontally from the context menu.

    By modifying this slightly, you should be able to scroll the canvas:

    • Add a QScrollArea widget to the form.
    • Move the canvas to the QScrollArea widget.
    • As before with the form, right-click on either the Scroll Area widget on the form or in the Object Inspector and apply a layout by selecting Layout->Some Layout Option. I used a Vertical layout for this.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
i want to parse a xhtml file and display in UITableView. what is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.