Created
December 5, 2017 09:38
-
-
Save teionn/6e4af8fdda5f7e6c347fcf7b0f8baa37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#コーディング: utf-8 | |
#------------------------------------------------------------------------------ | |
from Qt.QtWidgets import * | |
from Qt.QtGui import * | |
from Qt.QtCore import * | |
import maya.OpenMayaUI as OpenMayaUI | |
try : | |
import shiboken2 as shiboken | |
except: | |
import shiboken | |
#------------------------------------------------------------------------------ | |
class GUI(QMainWindow): | |
ptr = OpenMayaUI.MQtUtil.mainWindow() | |
parent = shiboken.wrapInstance(long(ptr), QWidget) | |
def __init__(self,parent=None): | |
super(GUI, self).__init__(self.parent) | |
self.setAttribute(Qt.WA_TranslucentBackground) | |
from ctypes import windll, c_int, byref | |
windll.dwmapi.DwmExtendFrameIntoClientArea(c_int(self.winId()), byref(c_int(-1))) | |
def main(): | |
global test_GUI | |
app = QApplication.instance() | |
test_GUI = GUI() | |
test_GUI.show() | |
app.exec_() | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment