Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    General and Desktop
    4
    8
    3997
    Loading More Posts
    • 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
      augiekim last edited by

      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 Reply Quote 0
      • D
        dangelog last edited by

        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 Reply Quote 0
        • A
          augiekim last edited by

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

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

          1 Reply Last reply Reply Quote 0
          • A
            andre last edited by

            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 Reply Quote 0
            • A
              augiekim last edited by

              Andre, I've tried that but not worked.

              1 Reply Last reply Reply Quote 0
              • G
                goetz last edited by

                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 Reply Quote 0
                • A
                  augiekim last edited by

                  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 Reply Quote 0
                  • G
                    goetz last edited by

                    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 Reply Quote 0
                    • First post
                      Last post