Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    NSView in QWidget

    General and Desktop
    2
    2
    4072
    Loading More Posts
    • 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.
    • P
      Powerpaule last edited by

      Hi,
      I have an application which uses NSTextView. Since QT5 doesnt contain QMacCocoaViewContainer any more, i had to find an other way to set an NSView into a QWidget. This way works in most cases:

      @
      NSView* parentNSView = reinterpret_cast<NSView*>(parent->winId());
      [parentNSView addSubview:(NSView*)nsTextView];
      @

      The widget is being displayed correctly. But Qt debugs the message "QBackingStore::flush() called with non-exposed window, behavior is undefined", and there are some problems when the nstextview is part of a docking widget... so I think it is not the right solution. I also tried

      @
      create(WId((NSView*)nsTextView), false, true);
      @

      In the QWidget's constructor that contains the NSTextview, but then it is not visible.
      Any tips?
      Thanks a alot..

      1 Reply Last reply Reply Quote 0
      • B
        b1gsnak3 last edited by

        You can wait for Qt 5.1 (when this bug will be fixed). And if you cannot then keep using 4.8.x

        1 Reply Last reply Reply Quote 0
        • First post
          Last post