Qt World Summit: Submit your Presentation

QMainWindow with QDockWidget or some type of sides?

  • I am making a print preview kind of page and want to have some type of different colored sides so the page doesnt take up the whole Window so itll look kind of like MS Word. I currently have a QMainWindow with a QTextEdit as the central widget.

    Is there a way I can do this?

  • Maybe try to set the size of the textedit and make them fixed? But then you have to catch the signal that the mainwindow is resized and resize your widget also.
    Maybe better to use horizontal or vertical spacers with a minimum with.
    Sorry, can't give any code, no Qt on this machine.

  • O I didn't think about using a horizontal spacer, thanks. Do you know anywhere that can show me how to add that in becasue I've never actually coded a spacer?

Log in to reply