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. NativeEvnet(winEvent) function with QGLWidget in Qt5
Forum Updated to NodeBB v4.3 + New Features

NativeEvnet(winEvent) function with QGLWidget in Qt5

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.7k 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.
  • J Offline
    J Offline
    junyoungp
    wrote on last edited by
    #1

    Hi All,

    I made a app which works on windows.
    It is made by QMainWindow without titlebar and I enabled aero snap using nativeEvent function of MainWindow.
    But I have a problem on my nativeEvent function with QGLWidget.
    I uses nativeEvent Function to handle WM_NCHITTEST event on my mainwindow class.
    But when I add a QGLWidget widget on my mainwindow, I cannot receive WM_NCHITTEST event in the mainwindow anymore.
    Instead, I caught the event on MenuWidget.
    I struggled with this problem in this week but I can't find any solution.
    Why it occurs? and How can I fix it?

    I attached whole source code at
    "https://www.yousendit.com/download/WUJZSU5CZ1BrWTk3czlVag":https://www.yousendit.com/download/WUJZSU5CZ1BrWTk3czlVag
    I tested the code with Qt5.0 beta (Compiled under 64bit env.) on windows 7 64bit.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      junyoungp
      wrote on last edited by
      #2

      I solved the problem posting messeg(using PostMessage function) to mainwindow.
      It occurs because when I create openGL context, it changes widget to native window from non-native one.

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qd678
        wrote on last edited by
        #3

        hello, could you explain the detail? how to postevent to mainwindow?

        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