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. How can I make a window same as Mac's Textured window and remove resizable mark on right bottom of the window?
QtWS25 Last Chance

How can I make a window same as Mac's Textured window and remove resizable mark on right bottom of the window?

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 4.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.
  • A Offline
    A Offline
    augiekim
    wrote on last edited by
    #1

    I know setAttribute(Qt::WA_MacBrushedMetal, true); method can make my window look similar to Mac's Textured window but it is not exactly same.

    Created by Qt with setAttribute(Qt::WA_MacBrushedMetal, true);
    !http://cross-platform-jabber-messenger.googlecode.com/svn/trunk/images/texture1.png!

    Mac's textured window
    !http://cross-platform-jabber-messenger.googlecode.com/svn/trunk/images/texture2.png!

    As you can see, the metallic brush painted on the Qt's window has different gradation when we compare to Mac's pure textured window.
    Can I make Qt Window exactly same as the Mac's textured window?
    And I have one more question, can I remove the image on the right bottom of the window which usually means the window is resizable?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      Which classes are you using to do that? Is that a QMainWindow with a inner QWidget?

      The grip in the lower right corner is a QSizeGrip, btw. It's enabled when using QMainWindow with a QStatusBar (see QStatusBar::setSizeGripEnabled).

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • A Offline
        A Offline
        augiekim
        wrote on last edited by
        #3

        Thank you poppe, I successfully removed the "QSizeGrip".

        And yes, it's a QMainWindow with a inner QWidget.

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

          I would try to get rid of the QMainWindow completely. Just use a QWidget as the base class for your dialog.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            augiekim
            wrote on last edited by
            #5

            Andre, I've tried that but not worked.

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

              BTW ... disabling the size grip is highly annoying. One cannot enlarge a dialog to see all the input in a line edit, for example. See your dialog as a bad example.

              Regarding the metal brush: this could be a Carbon/Cocoa issue (Qt is delivered/can be compiled for both OS X flavors) - I didn't test it myself, though it's just a guess.

              http://www.catb.org/~esr/faqs/smart-questions.html

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

                Thank you Volker.
                In fact, what I'm doing now is moving native win32 or COCOA based applications (including some of wxWidgets based) into Qt to identify what kinds of things Qt can do without native win32 or COCOA APIs.
                I agree to you about resizing dialogs, but my designers usually offer guide lines contain fixed-sized windows thus it is important to know how to remove the size grip to me.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  I just tried it and there is no difference between a Qt build against Carbon or Cocoa. For now I have no further idea, what you can do to create the "right" look of the dialog.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  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