Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. qwindow

    Log in to post
    • All categories
    • O

      Unsolved Several errors in plugins ("windows")
      General and Desktop • python pyqt dll qwindow bug • • olenscki

      1
      0
      Votes
      1
      Posts
      90
      Views

      No one has replied

    • C

      Unsolved disable window frame
      General and Desktop • qwindow • • continue98

      5
      0
      Votes
      5
      Posts
      122
      Views

      C

      up (8 chars)

    • R

      Unsolved QWindow OpenGL Tearing
      General and Desktop • qwindow opengl vsync glitch qsurfaceformat • • rtavakko

      5
      0
      Votes
      5
      Posts
      314
      Views

      SGaist

      It should be supported indeed. Did you try with a more recent release of Qt ? Like 5.15 or even 6.2 ?

    • R

      Solved WGL Window on non-GUI thread
      General and Desktop • qopenglcontext wgl opengl32.dll qwindow • • rtavakko

      4
      0
      Votes
      4
      Posts
      455
      Views

      S

      Here are all the WGL functions
      https://docs.microsoft.com/en-us/windows/win32/opengl/wgl-functions

      The function of interest is
      wglMakeCurrent
      https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-wglmakecurrent

      The line of interest is
      "A thread must set a current rendering context before calling any OpenGL functions. Otherwise, all OpenGL calls are ignored."

      so, what I recommend is to call
      wglMakeCurrent(NULL, NULL); (or whatever the Qt equivalent is.)
      from your GUI thread.

      Then, in your other thread, make a context current by calling.
      wglMakeCurrent(hdc, glcontext); (or whatever the Qt equivalent is.)
      and now, you can make gl funciton calls.

      When you are finished, call
      wglMakeCurrent(NULL, NULL);
      then, release the GL context, destroy the GL context and all that stuff.

    • R

      Solved QWindow on a non-GUI thread
      General and Desktop • qwindow opengl threaded • • rtavakko

      11
      0
      Votes
      11
      Posts
      820
      Views

      R

      @wrosecrans

      Yes, I'm rendering using a QOffscreenSurface on a separate thread then displaying the frame on a QWindow on the GUI thread, but it makes sense to have all of the video rendering on the same thread so we're not interfering with the GUI thread.

      I've successfully tested this concept with GLFW-based OpenGL windows and QT UI. I doubt Vulkan will be any different since from what I understand the render window will still need to sit on the GUI thread.

    • M

      Solved [SOLVED] mousePressEvent in QtQuickView
      QML and Qt Quick • mousepressevent event qwindow qquickwindow qquickview • • madoodia

      13
      0
      Votes
      13
      Posts
      829
      Views

      M

      The problem is solved
      please check this
      https://forum.qt.io/topic/113640/solved-why-q-window-events-are-eaten-by-qml-item

      thanks

    • D

      Unsolved QWindow - openGL implementation, painter not paiting?
      General and Desktop • qwindow opengl • • Dariusz

      4
      0
      Votes
      4
      Posts
      534
      Views

      mrjj

      Hi
      Hmm, nope. it looks very much like the sample
      with some code from TriangleWindow::initialize()
      in the render() function.

    • A

      Solved Remember window size before maximization (or Detect if QResizeEvent is maximization)
      General and Desktop • qwindow qresizeevent maximize maximized • • Arthur Araruna

      5
      0
      Votes
      5
      Posts
      2334
      Views

      A

      @marcbf said in Remember window size before maximization (or Detect if QResizeEvent is maximization):

      int w = currentSize.width();
      int h = currentSize.height();

      if (restoresize)
      {
      w = qMax(settings["Width"].Value(0), w);
      h = qMax(settings["Height"].Value(0), h);
      }

      Man, this is the deal!!! Everything worked perfectly after I fine tuned your code to my context! Thank you very much.

      The trick was really to use normalGeometry and windowState, so these two are the answer to my question.

    • Poorti

      Embedding window inside Illustrator panel does not load 3D model on Mac
      General and Desktop • qmainwindow qwindow embed qmacnativewidge • • Poorti

      3
      0
      Votes
      3
      Posts
      1164
      Views

      Poorti

      @mrjj
      Thanks for the reply!
      I followed your advice and tried setting the panelWindow as the parent...
      No change..

      Any other ideas?
      I followed this link,
      http://doc.qt.io/qt-5/qmacnativewidget.html#details

    • B

      Unable to paint on Qt Widget, shows error “paintEngine: Should no longer be called”
      General and Desktop • qt5.5 qwidget scribbling qpainter qwindow • • beginMyCoding

      14
      0
      Votes
      14
      Posts
      27962
      Views

      B

      @mrjj yeah!! its working bro if i remove label.. Thank you all for your suggestions

    • P

      Unsolved How to make QMenuBar focused
      General and Desktop • focus qmenubar qwindow • • pmendl

      6
      0
      Votes
      6
      Posts
      2486
      Views

      kshegunov

      @pmendl
      No problem. Do bear in mind that if you decide to send the event with QApplication::sendEvent, you are responsible for the event object's deletion, so it's a good idea to create it on the stack in that case. Good luck!

      Kind regards.

    • H

      Solved Twice QPainter on same QWindow causes crash
      General and Desktop • qpainter qwindow crash • • Harry123

      5
      0
      Votes
      5
      Posts
      1678
      Views

      Chris Kawa

      It's not very well exposed, but this is actually documented in QPainter::begin():

      Warning: A paint device can only be painted by one painter at a time.

    • ravas

      is showMaximized() guaranteed to show the window?
      General and Desktop • qwidget qwindow • • ravas

      3
      0
      Votes
      3
      Posts
      1694
      Views

      ravas

      @Wieland Thanks for the help and the link.

      Do you know any desktop environment where showMaximized doesn't work?

      No I do not. I'm contributing to an open source project so I want to be sure.

    • R

      Unsolved QT & raw OpenGL with glew not working
      General and Desktop • opengl glew qwindow • • Row_Rebel

      9
      0
      Votes
      9
      Posts
      5246
      Views

      R

      @SGaist
      Ok I guess i'll open a different question for this issue, thanks anyway for your help

    • ?

      Unsolved [solved]Testing ApplicationWindow.visibility enum values?
      QML and Qt Quick • qwindow • • A Former User

      3
      0
      Votes
      3
      Posts
      1008
      Views

      ?

      @p3c0

      Hey thanks! Works as expected.
      Another baby step on the road to writing more interesting bugs. . . ;-)

    • W

      Mac dead keys and QInputMethodEvent
      General and Desktop • qinputmethodeve dead keys qwindow qwidget mac os • • woolfman007

      2
      0
      Votes
      2
      Posts
      1010
      Views

      SGaist

      Hi,

      You could try with an eventFilter and handle QEvent::InputMethod in there

      Hope it helps

    • P

      Embedded QWindow in Fullsreen mode
      General and Desktop • qwindow • • PhlipVR

      4
      0
      Votes
      4
      Posts
      876
      Views

      SGaist

      Can you try to first go full screen and only then create the embedded QWindow ?

    • T

      An transparent ellipse on OpenGLSurface is not draw correctly
      Mobile and Embedded • android opengl es2.0 qwindow • • Tank2005

      1
      0
      Votes
      1
      Posts
      496
      Views

      No one has replied

    • Zee_07

      synchronize two QabstractItemModel on Single Common Column
      General and Desktop • qwindow qtableview qabstractitemmo qheaderview sorting qwidget custom item • • Zee_07

      1
      0
      Votes
      1
      Posts
      573
      Views

      No one has replied

    • X

      get Gestures in QWindow
      General and Desktop • qwindow gestures • • Xv1nX

      10
      0
      Votes
      10
      Posts
      3371
      Views

      X

      I found out the solution using native Windows Gestures WM_Gesture.
      By default QT registers QMainWindow-Window as a Touch Window, so the QMainWindow-App only get WM_Touch events.
      As said above one can only get either WM_Touch event or WM_Gesture event. So you have to unregister the window from getting Touch event. I do that in the constructor like this:

      HWND myHwnd = reinterpret_cast<HWND>(this->winId()); PULONG flag = 0; bool istouch = IsTouchWindow(myHwnd,flag); if(istouch) UnregisterTouchWindow(myHwnd);

      now i get WM_Gesture events in nativeEvent:

      bool OpenGLWindow::nativeEvent(const QByteArray & eventType, void* message, long* result) { MSG* msg = reinterpret_cast<MSG*>(message); switch(msg->message){ case WM_GESTURE: case WM_GESTURENOTIFY: emit sendNativeEvent(eventType, message, result); break; } return false; }

      Thanks for your help.