Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. window
    Log in to post

    • SOLVED Restored window after minimizing is not maximized
      QML and Qt Quick • qml button window visibility minimize • • Krakenus00  

      3
      0
      Votes
      3
      Posts
      46
      Views

      Omg, I've just ORed the flags, and now it works as intended. In QtWidgets it should be: // To set the window minimized setWindowState(windowState() & ~Qt::WindowActive | Qt::WindowMinimized); // To restore the window from minimized state setWindowState(windowState() & ~Qt::WindowMinimized | Qt::WindowActive); So in QML it should work in the same way.
    • SOLVED How can I create a frameless fixed size window compatible with high DPI?
      QML and Qt Quick • windows 10 window high dpi monitor configuration • • jeanmilost  

      4
      0
      Votes
      4
      Posts
      57
      Views

      I finally found a solution which seems to work in my case. I added the Qt.MSWindowsFixedSizeDialogHint window flag, which seems to fix the issue. So below is the modified code: ApplicationWindow { // common properties id: awMainForm width: 602 height: 728 flags: Qt.Window | Qt.FramelessWindowHint | Qt.MSWindowsFixedSizeDialogHint visible: true // form content isn't relevant ... }
    • SOLVED How to get ALL the keyboard pressed keys WITHOUT RESTRICTION OR FILTER?
      QML and Qt Quick • window keyboard filter key • • jeanmilost  

      3
      0
      Votes
      3
      Posts
      35
      Views

      @J-Hilk said in How to get ALL the keyboard pressed keys WITHOUT RESTRICTION OR FILTER?: Inside main.cpp install an eventfilter on the Q(GUI)Application Thank you very much, this was exactly what I needed!
    • SOLVED Multiple UI windows??
      QML and Qt Quick • qml c++ window multi-screen ui.qml • • texasRanger  

      9
      0
      Votes
      9
      Posts
      123
      Views

      @texasRanger said in Multiple UI windows??: Solved here: https://forum.qt.io/topic/99477/multiwindow-in-qml-proof-of-concept/7 The solution in this post is unnecessarily complicated. In your question about them being blank I don't understand what you are doing //main.qml QtObject { property Window window1: Window { visible: true // ... } } //FirstForm window1 { //UI formating } How are those two related? Why not do this? //main.qml QtObject { property Window window1: Window { visible: true // ... FirstForm { anchors.fill: parent } } }
    • UNSOLVED Window's content (OpenGL) freezes when interacting with its title bar - Bug?
      QML and Qt Quick • qml opengl window freezing • • IanShade  

      1
      0
      Votes
      1
      Posts
      129
      Views

      No one has replied

    • SOLVED Window.width in a property
      QML and Qt Quick • qml window • • Moisi  

      5
      0
      Votes
      5
      Posts
      80
      Views

      Oh, yep, with this explaination is more clear. Thank you a lot ^^
    • SOLVED register mouse movement inside a particular window?
      General and Desktop • signal window mouse mouseevent movement • • 4oh4  

      2
      0
      Votes
      2
      Posts
      216
      Views

      Solved, overrode the standard event() and just used event.type() == QEvent::hovermove to get what I needed.
    • SOLVED change ApplicationWindow size on Android
      Mobile and Embedded • android window screen • • morte  

      5
      0
      Votes
      5
      Posts
      416
      Views

      @morte ApplicationWindow { Item { id: banner x: 0; y: 0 width: parent width; height: 50 } Item { id: content width: parent.width anchors { top: banner.bottom bottom: parent.bottom } } }
    • UNSOLVED Rendering error after changing the size of Window
      QML and Qt Quick • image window • • wangfys  

      4
      0
      Votes
      4
      Posts
      565
      Views

      @wangfys I got exactly the same behavior as you. Although I never used the scene graph before, your example (+ the doc and the Custom Geometry example in Qt's examples) gave me a little crash course in the topic. http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html Your example really should work as it seems you did everything as required by the doc. At my side, the lines become visible once I hover the mouse one the exit button. Possibly this is a bug? PS. Again, not being useful, I maybe I could suggest you to change the definition of your points from QVariantList points; to QVector<QPointF> points; Then you can use: const float x = static_cast<float>(points[i].x()); const float y = static_cast<float>(points[i].y()); vertices[i].set(x, y); rather than vertices[i].set(points[i].toPointF().x(), points[i].toPointF().y()); as it saves you a couple of calls to toPointF().
    • SOLVED Open external window in windows from QML application: SetProcessDpiAwareness(2) failed
      QML and Qt Quick • window windows10 • • robro  

      2
      0
      Votes
      2
      Posts
      340
      Views

      Ok, I have not found a solution but a workaround. I have to open and close the external window before my QML gui is opened. So I do this in my main before the QML engine loads the QML file. Then I pass the necessary information from the external window via pointers to my GUI.
    • SOLVED QML Window gets resized on Android - How to deal with this?
      QML and Qt Quick • qml android window • • bnetz  

      2
      0
      Votes
      2
      Posts
      1046
      Views

      I solved it for now by using a size relative to its parent and calculating a scale from it. Also applying the same scale to the position of the Pathview gives a usable solution, but it requires a few additional calculations. I see how the (617 * 411) resolution occurs. So the Windows width: and height: properties are not sizes in pixels.. Desktop - 1920*1200 or 2560x1440 density 4.2969047380546925 pixelRatio 1 Mobile density 6.5092731829573935 - 1620 x 1080 pixelRatio 2.626672502927989 1620/2.6266... gives 617 1080/2.6266... gives 411
    • SOLVED Pop up a new window on a pushed button
      General and Desktop • button window connect slots • • Adrian.Aioanei  

      6
      0
      Votes
      6
      Posts
      29523
      Views

      Yep, it works. Thanks :)
    • UNSOLVED Window and Dialog unexpected visible behavior
      QML and Qt Quick • window dialog behavior visible unexpected • • eyvx  

      2
      0
      Votes
      2
      Posts
      801
      Views

      No ideas? =(
    • UNSOLVED QML opening same QML window RAM issue
      QML and Qt Quick • qml window ram • • RiteshPanchal  

      14
      0
      Votes
      14
      Posts
      3880
      Views

      @RiteshPanchal Ok. Here is a very simplified demo which may help you understand the basics. Once you get familiar with these you can explore other options like StackView or SwipeView which also acts as a container for pages and provides methods for its manipulation. The following example consider Item as root element for the child components. You can change it to Window or whatever and adding its related small changes. //Main window //RootWindow.qml import QtQuick 2.6 import QtQuick.Controls 2.0 import QtQuick.Window 2.1 Window { id: root width: 250 height: 250 property QtObject obj1 property QtObject obj2 signal hideObj(QtObject obj) Component.onCompleted: { root.hideObj.connect(onHideObj) } function onHideObj(obj) { obj.visible = !obj.visible } Row { anchors.top: parent.top Button { text: "One" onClicked: { if(!obj1) { obj1 = Qt.createComponent("Item1.qml").createObject(root); } obj1.visible = true; } } Button { text: "Two" onClicked: { if(!obj2) { obj2 = Qt.createComponent("Item2.qml").createObject(root); } obj2.visible = true; } } } } //Item1.qml import QtQuick 2.6 Item { id: item1 anchors.bottom: parent.bottom anchors.left: parent.left width: 50 height: 50 Rectangle { color: "red" anchors.fill: parent Text { anchors.centerIn: parent text: "Item1" } MouseArea { anchors.fill: parent onClicked: root.hideObj(obj2) } } } //Item2.qml import QtQuick 2.6 Item { id: item2 anchors.bottom: parent.bottom anchors.right: parent.right width: 50 height: 50 Rectangle { color: "green" anchors.fill: parent Text { anchors.centerIn: parent text: "Item2" } MouseArea { anchors.fill: parent onClicked: root.hideObj(obj1) } } } The two buttons here creates and shows 1 item each containing a colored rectangle and a text displayed at the bottom. Then after creating these 2 items, try clicking on each individual colored rectangle, it will hide/show other rectangle. This works by sending a signal to the root window from the child component.
    • SOLVED Instantiating a tool window in qml from c++
      QML and Qt Quick • qml window • • Smatcher  

      2
      0
      Votes
      2
      Posts
      2337
      Views

      Nevermind. I found the solution. The parenting between the main window and the tool window should not be done with setParent but with setTransientParent. I hope this helps someone someday
    • UNSOLVED Child Window in taskbar
      General and Desktop • window child taskbar • • ars1614  

      10
      0
      Votes
      10
      Posts
      4038
      Views

      @Radek Thank you very much Radek you helped me so much. even 4 years after your answer.
    • SOLVED Double-click causes opening new window in Table View
      General and Desktop • sql tableview window • • drock  

      4
      0
      Votes
      4
      Posts
      1535
      Views

      Thanks everyone
    • SOLVED how to show a window in same window not new page
      General and Desktop • windows window show کیوت کیوتی • • M4RZB4Ni  

      3
      0
      Votes
      3
      Posts
      972
      Views

      Hi QStackedwidget is also good for a design where you want a mainwindow with "pages"
    • SOLVED Resize Objects With Mainwindow Resize
      General and Desktop • resize window object • • M4RZB4Ni  

      4
      0
      Votes
      4
      Posts
      1542
      Views

      Hi If you use layouts and put the buttons in one. Then no need for any code to do resize. So using layouts is how you do in Visual Design. Try this : Make new project open the mainwindow UI Place a button in the empty mainwindow. Right click empty spot on form Select the Layout menu (bottom) Select Layout Horizontally
    • UNSOLVED Qt Advanced Docking System - BETA
      Showcase • window docking • • mfreiholz  

      2
      5
      Votes
      2
      Posts
      2412
      Views

      Hi and welcome to devnet, Thanks for sharing ! Looks good !
    • SOLVED Executing second window causes program to get stuck
      General and Desktop • window qt 5.6.0 exec ui object pass qobject • • oblivioncth  

      16
      0
      Votes
      16
      Posts
      3961
      Views

      @oblivioncth said: Ok, its shaping up , super :) "Helps givez me codes". We do help those too but good questions often get better answers. Also its clear that you do try to fix it first yourself, so some holes in c++ is no issue. Cheers
    • Developer environment improvement (QT Creator)
      Tools • qt creator window git environment • • mat300  

      16
      0
      Votes
      16
      Posts
      3406
      Views

      @SGaist Thanks for tips. But anyway, as I see the problem, Inability of Creator to remember window layout is not a bug because I had and have the same problem for all Creator Win and Linux versions that I used during last 8 years. Can you prove that you can open several windows and then switch to another session and after that switch back to first session and get previous windows layout? It is very interesting for me to see that.
    • SOLVED Window is not in focus when opened
      General and Desktop • qwidget window • • gabor53  

      14
      0
      Votes
      14
      Posts
      4709
      Views

      @gabor53 good work!
    • UNSOLVED Disable close button on qml window
      QML and Qt Quick • qml window title bar • • PhlipVR  

      4
      1
      Votes
      4
      Posts
      4031
      Views

      @p3c0 said: Window { flags: Qt.FramelessWindowHint } Thanks it works.
    • UNSOLVED New Access control system based on RFID + keypad available.
      Announcements • android ios mac window rfid • • mrdebug  

      2
      0
      Votes
      2
      Posts
      977
      Views

      Now brochure in English available. http://www.labcsp.com/
    • UNSOLVED Qt5 Mobile Windows Phone calling .NET stuff from Qt? (for push)
      Mobile and Embedded • window mobile • • Heiko93  

      2
      0
      Votes
      2
      Posts
      739
      Views

      Hi, the Visual Studio compilers are the only option if you are targeting Windows Phone and/or Windows Store Apps. Whether there are C++ bindings/headers for a C# library depends on the provider of that library. Even Microsoft is not 100% consistent. Some items are fully supported (In-App-Purchase), some partially (In-App-Advertising) and some are simply not exposed to C++ at all. You will need to check the documentation yourself unfortunately.
    • UNSOLVED Activating window when mouse hovers over it
      General and Desktop • qt5 window mouse mouseevent hover • • js0823  

      3
      0
      Votes
      3
      Posts
      1654
      Views

      Oops sorry about that. I'll write Qt from now on haha. Thanks for correcting me. Also, thank you for the info. I am looking into it right now!
    • SOLVED Annoying White Screen Flash Before Webkit App Loads
      General and Desktop • window webkit rendering delay webkitwidgets • • maximo  

      2
      0
      Votes
      2
      Posts
      1199
      Views

      I fixed it like so: Comment out the default w.show() in my main.cpp. I created a Q_INVOKABLE class method on main window called showAppWindow() that merely does a this->show(). I did the steps to inject my C++ object (called cpp) into my Javascript via the C++ <==> Webkit bridge. In my index.html file, at the bottom before the ending BODY tag, I added this: <script type="text/javascript"> try { if (cpp) { setTimeout('cpp.showAppWindow();',100); } } catch(e){} </script>
    • SOLVED Hide & Show QWidget in closeEvent with Keyboard key
      General and Desktop • qwidget window keyboard hide closeevent • • pusheax  

      8
      0
      Votes
      8
      Posts
      2890
      Views

      You're welcome ! As for marking the thread as solved, you can now use the "Topic Tool" button, it will keep the title clean. Also, while browsing the forum, please consider up-voting answers that helped you, that will make them easier to find for other forum users :)
    • show confirmation message and block screen before leave(close or loose focus) main window[SOLVED]
      General and Desktop • desktop window • • Giorgi  

      3
      0
      Votes
      3
      Posts
      1901
      Views

      Thank you for reply. I also used this->setWindowFlags(Qt::WindowStaysOnTopHint); and QMainWindow::showFullScreen(); to stay my confirmation message on top. that was my goal.
    • QML Window implicit size based on component and property changes
      QML and Qt Quick • window implicit size • • Thibaut D.  

      1
      0
      Votes
      1
      Posts
      706
      Views

      No one has replied

    • QML Opacity Inheritance [ Solved ]
      QML and Qt Quick • qml window inheritance opacity • • Cybrum  

      6
      0
      Votes
      6
      Posts
      7738
      Views

      @bck25 ,@Frime Thank you all for the replies. I can not set the alpha value as I am using an image as the background. I solved this by moving the opacity to the BorderImage which acts as background of the Window. Window { id : root flags: Qt.FramelessWindowHint visible:true color: "transparent" // This works properly when Aero theme is enabled in Windows BorderImage { visible:true width:root.width height:root.height opacity: 0.8 source: "background.png" } }
    • How to get Window width/height
      QML and Qt Quick • qml window • • lajtu  

      4
      0
      Votes
      4
      Posts
      1707
      Views

      @lajtu For Screen it works because width is an Attached Property for it.
    • Qt minimizing Dialog minimizes Parent Window
      General and Desktop • qt5.4 window dialog • • haris123  

      3
      0
      Votes
      3
      Posts
      3175
      Views

      Hi Thanks for the detailed answer, now the issue solved
    • Translucent window with click-through behaviour
      General and Desktop • window transparency click translucent through • • Rphysx  

      3
      0
      Votes
      3
      Posts
      1310
      Views

      Win7 & Qt 5.4.2 with QtCreator 3.4.1
    • Qtlua for Qt5.4.0 on Windows [Solved]
      Installation and Deployment • mingw window qt 5.4.0 qtlua qt 5.0.2 libqtlua-2.0 • • MTCA  

      11
      0
      Votes
      11
      Posts
      4401
      Views

      Great ! I forgot that usual suspect… It's a tricky one… Thanks for sharing ! Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)
    • Macosx QWarning "Attempt to set a screen on a child window."
      General and Desktop • window mainwindow macosx screen child • • mmirsky  

      2
      0
      Votes
      2
      Posts
      2236
      Views

      Compiled and rebuilt with Qt5.5.0 (beta). Unfortunately, the problem persists.
    • background picture won't apply to main widget
      General and Desktop • stylesheet widget window background main picture • • Arty.McLabin  

      4
      0
      Votes
      4
      Posts
      1224
      Views

      @Chris-Kawa, you got me wrong i guess, the problem is not stylesheet inheritance, it's about the target widget itself NOT getting the stylesheet, instead that only passing style to children, naming him doesn't affect the result too.
    • Can't add shadow to frameless window
      General and Desktop • window shadow frameless • • Dymytr Yovchev  

      1
      0
      Votes
      1
      Posts
      1178
      Views

      No one has replied

    • Open Window from Sibling Window
      General and Desktop • qt creator window show • • Cosford  

      11
      0
      Votes
      11
      Posts
      2342
      Views

      @Cosford I am happy to hear you made it. If I helped in any way - my pleasure.