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. Windows without title bar but with border
Qt 6.11 is out! See what's new in the release blog

Windows without title bar but with border

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 6.1k Views 1 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I have exactly the same problem and I know that it is solvable (QDockWidget does it successfully).
    I haven't found an easy solution in the Qt Source. Does anybody know how QDockWidget does it?

    Moderators note:
    This topic was split off from "this":http://developer.qt.nokia.com/forums/viewthread/8140/ topic, because the other topic was on Mobile and Embedded while this one is on the (linux) desktop. While searching the forums for similar information is really good practice (thanks!), it is not always a good idea to revive an old topic. Instead, linking to it may be a better alternative. Andre

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      Hi holy,

      AFAIK QDockWidget is not a top levbel widget, which means, everything is done by hand :-)
      For top level widgets, this is done by the windowinmg system (in the case of the OP, QWS).

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Thank you for your reply. I am mainly interested in linux desktops.
        (I know this question is in mobile, but I didn't want to repost)
        If i create a QDockWidget without a parent, it is a top-level widget and still it does not have a system title bar. The flags it has are:

        @
        (Qt::Window | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint)
        @

        So how does it get no title bar even though it has the Qt::WindowTitleHint flag set?

        [EDIT: code formatting, please wrap in @-tags, Volker]

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          I would propose, you look at the source code.
          perhaps (as it it typically not a top level widget) perhaps, these flags have a special handling in this class?

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zentel.
            wrote on last edited by
            #5

            I want to know whether I can do that in Qt quick project?

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #6

              if you have a main app and a QDeclarativeView, you can do stuff in C++.

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                [quote author="holy" date="1321636507"]Thank you for your reply. I am mainly interested in linux desktops.
                (I know this question is in mobile, but I didn't want to repost)[/quote]

                -In that case, let me just move it for you.-
                -In the future, you can just use the "report" link next to your post and request an admin moves it to the correct subforum. -
                update:
                I decided to split off the topic, because the " other part":http://developer.qt.nokia.com/forums/viewthread/8140/ was on mobile & embedded (moved that part back there). Thanks for searching the forum before just posting your question, but sometimes it is better to just link to it instead of reviving an old topic.

                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