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. [Solved] How to drag the size of windows?
Forum Updated to NodeBB v4.3 + New Features

[Solved] How to drag the size of windows?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.0k 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.
  • T Offline
    T Offline
    topson128
    wrote on last edited by
    #1

    Hi! all,

    Is there any way to re-size a window(QFrame , QTextEdit...) via dragging it's bottom right-hand corner?
    !http://www.freeimagehosting.net/newuploads/kbdcb.png(resize)!
    ↑
    (I want to put this function in a QFrame or a QTextEdit.)

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rahul Das
      wrote on last edited by
      #2

      http://doc.qt.digia.com/qt/qwidget.html#resizeEvent


      Declaration of (Platform) independence.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        topson128
        wrote on last edited by
        #3

        Thank you, Rahul! I'll try it.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sam
          wrote on last edited by
          #4

          You can use "QSizeGrip":http://qt-project.org/doc/qt-5.0/qtwidgets/qsizegrip.html#details

          1 Reply Last reply
          0
          • T Offline
            T Offline
            topson128
            wrote on last edited by
            #5

            [quote author="Sam" date="1357125307"]You can use "QSizeGrip":http://qt-project.org/doc/qt-5.0/qtwidgets/qsizegrip.html#details [/quote]

            Hi! Sam,

            This is a useful and simple method for me.
            Thank you so much.

            Code:
            @
            QSizeGrip *qs = new QSizeGrip(ui->MyFrame);
            ui->MyFrame->layout()->addWidget(qs);
            ui->MyFrame->layout()->setAlignment(qs, Qt::AlignBottom | Qt::AlignRight);
            @

            Result:
            !http://www.freeimagehosting.net/newuploads/o149f.png(c)!

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sam
              wrote on last edited by
              #6

              You are welcome,

              Kindly Edit your first post and prepend [Solved] to the title.

              Regards
              Soumitra.

              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