Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Qt How to set the alignment of a widget to alClient?

 

When using the Qt Creator IDE (and especially when you have a C++ Builder background) You are probably viewing this page, because using a QLayout from the Widget Toolbox did not work as expected. This page describes the way that works.

 

  1. Create a new Qt4 Gui application, that has a main window derived from QDialog
  2. View the QDialog's user interface (for example, by double-clicking on 'dialog.ui' in the project manager)
  3. You will need to right-click on the dialog and select 'Layout'. If you do now, most options are disabled. You will need to add some Widgets first
  4. Put two QPlainTextEdits on the QDialog
  5. Right-click on the QDialog and select 'Layout -> Lay Out Vertically'

 

 

 

 

 

External links

 

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict