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. Using QStatusBar with QWidget instead of QMainWindow.
Forum Updated to NodeBB v4.3 + New Features

Using QStatusBar with QWidget instead of QMainWindow.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 3.0k Views 2 Watching
  • 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.
  • R Offline
    R Offline
    RaisinBread22
    wrote on last edited by RaisinBread22
    #1

    The official Qt documentation states that "Typically, a request for the status bar functionality occurs in relation to a QMainWindow object". The use of the word "typically" as opposed to "always" leads me to wonder if a status bar can occur, albeit less often, in relation to QWidget or something else? Although, I've noticed that there isn't a setStatusBar() method for QWidget like there is for QMainWindow. When I assign a layout to the Qwidget the call addWidget(), the status bar acts like any normal widget in the layout, and not like the status bar in QMainWindow. The reason why I'm thinking about using a statusbar with the QWidget is that I've been unable to resolve my problem of not being able to use a repeating SVG pattern as a backround in a QMainWindow, so I'm hoping I can keep using QWidget as the main window and keep the SVG.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      You can just new a QStatusBar and insert it into what ever you want.
      Unlike mainwindow and its setStatusBar() , one difference is that its up to you
      to use layout to keep it aligned to bottom of the Widget.

      1 Reply Last reply
      1

      • Login

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