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 we disable Moving QWidget/QDialog from Title-bar?
Forum Updated to NodeBB v4.3 + New Features

How can we disable Moving QWidget/QDialog from Title-bar?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.5k 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
    TobbY
    wrote on 6 Nov 2018, 11:27 last edited by
    #1

    I wanted to lock window from moving. Are there some kind of flag to disable moving?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 6 Nov 2018, 14:03 last edited by
      #2

      Hi
      There is no such flag, but you can remove the caption
      with Qt::FramelessWindowHint.

      That said, can you explain a bit why you want such window
      as if used as a main window, it would violate most user interface guidelines
      and for me personally its an instant kill and uninstall.

      However, your use case might be special so a bit more information of the overall goal
      would make it easier to suggest a good solution.

      1 Reply Last reply
      1
      • T Offline
        T Offline
        TobbY
        wrote on 6 Nov 2018, 15:17 last edited by
        #3

        Thanku @mrjj
        I have solved the issue by using bool nativeEvent(const QByteArray &eventType, void *message, long *result). I need this because i need to lock closing and movement of multiple opened windows. And user can enable and disable this feature.

        M H 2 Replies Last reply 6 Nov 2018, 18:32
        0
        • T TobbY
          6 Nov 2018, 15:17

          Thanku @mrjj
          I have solved the issue by using bool nativeEvent(const QByteArray &eventType, void *message, long *result). I need this because i need to lock closing and movement of multiple opened windows. And user can enable and disable this feature.

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 6 Nov 2018, 18:32 last edited by
          #4

          @TobbY
          ok like a grid manager of sorts. fair enough :)

          1 Reply Last reply
          0
          • T TobbY
            6 Nov 2018, 15:17

            Thanku @mrjj
            I have solved the issue by using bool nativeEvent(const QByteArray &eventType, void *message, long *result). I need this because i need to lock closing and movement of multiple opened windows. And user can enable and disable this feature.

            H Offline
            H Offline
            hbatalha
            wrote on 13 Jul 2021, 14:28 last edited by
            #5

            @TobbY I know this topic is very old but I am facing the same issue and I would like to know how exactly you did that

            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