Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMainWindow with QDockWidget or some type of sides?
QtWS25 Last Chance

QMainWindow with QDockWidget or some type of sides?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    confused
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      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.

      Greetz, Jeroen

      1 Reply Last reply
      0
      • C Offline
        C Offline
        confused
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved