Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Non-resizable QQuickView window
Forum Updated to NodeBB v4.3 + New Features

Non-resizable QQuickView window

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 4.9k 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.
  • K Offline
    K Offline
    khajvah
    wrote on last edited by
    #1

    I have a qml file and open its window like this:

    @
    QQuickView* logView = new QQuickView();
    logView->setSource(QUrl::fromLocalFile("saveLog.qml"));
    @

    How can I make that window non-resizable?
    "This":http://qt-project.org/doc/qt-5.0/qtquick/qquickview.html#resizeMode-prop tells that it I can have two resize modes:

    • QQuickView::SizeViewToRootObject
    • QQuickView::SizeRootObjectToView

    But there is no option for non-resizable windows.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pehcha
      wrote on last edited by
      #2

      Hi,

      If you want to get rid of resize capabilities for you window (I mean so that user will not be able to resize the window) just make it frameless. Add the following line:

      @logView->setFlags(Qt::FramelessWindowHint | Qt::Tool);@

      1 Reply Last reply
      0
      • p3c0P Offline
        p3c0P Offline
        p3c0
        Moderators
        wrote on last edited by
        #3

        Or you could set the minimum and maximum size to some fixed size.

        157

        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