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. After building qt5, not able to find qmacdefines_mac.h in built lib/QtGui.framework

After building qt5, not able to find qmacdefines_mac.h in built lib/QtGui.framework

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k 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.
  • M Offline
    M Offline
    mavericks
    wrote on last edited by
    #1

    I am upgrading some qt projects from qt version 4 to version 5 on mac(mavericks). For that, i built qt5 from source and modified projects to use the qt5 lib which i built.

    In my code, i am using qwidget method in my derived class:

    virtual bool macEvent(EventHandlerCallRef caller, EventRef event)

    But i get "Unknown type name EventHandlerCallRef" and "Unknown type name EventRef". After searching for this in qt 4, i found it inside "qmacdefines_mac.h" in lib/QtGui.framework/... but i could not find same file in qt 5 lib/QtGui.framework.

    Did i miss any flag while building qt 5?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      No you didn't. However, the internal architecture changed a lot in between. You might be interested by the nativeEvent method.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mavericks
        wrote on last edited by
        #3

        Thanks for your reply SGaist.

        In old implementation(qt4), i was using EventRef to get NSEvent using as below code :

        mywidget::macEvent(EventHandlerCallRef caller, EventRef event)
        {

        NSEvent e = [NSEvent eventWithEventRef: event];
        //using nsevent below
        .....
        }
        In latest macEvent got deprecated and now have a new api nativeevent,

        mywidget::nativeEvent(const QByteArray& eventType, void* message,
        long* result)
        {

        }
        How can we convert void *message to NSEvent on mac?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          AFAIK, you can simply cast message to NSEvent

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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