Qwidget Pyqt5

Moving Flask app from local environment to Ubuntu 14. QtWidgets import. WindowFlags flags = 0)該parent的說法,如果不是沒有,原因self通過Qt的,而不是PyQt的擁有。. PyQt Examples(PyQt各种测试和例子) PyQt4 PyQt5. 1 and tested on Symbian devices. QtWidgets import QMainWindow, QApplication, QWidget, QTableWidget,QTableWidgetItem,QVB. PyQt5 имеет богатый набор готовых виджетов. I have been working with PyQt5 and Python3 but had some issues when trying to package the app with Pyinstaller, so I'm now trying to move my environment to Homebrew. 4, inside a virtual environment. Dialog windows can also be used to create a window that con rms a user actually wants to exit an application when the close button is pushed. This article may require cleanup to meet the Qt Wiki's quality standards. 10対応 (SHOEISHA DIGITAL FIRST)posted with カエレバ折戸 孝行 翔泳社 2018-03-15 Amazonで最安値を探す楽天市場で最安値を探すYahooショッピングで最安値を探す 目次 目次 はじめに インストール Macの場合 Linux…. 下面是最小化的PyQt应用,其甚至不包括窗口,如果运行该程序,说明都不会发生,但其仍在运行。. Widgets are basic building blocks of an application. El botón se puede crear llamando al constructor QPushButton con el texto para mostrar como parámetro. QWidget is the base class for all GUI elements in the PyQt5. Method Documentation QWidget. But the problem is, that the Dilaog is. What do you think? Is there anything you thing I could change/improve in terms of code or visually (font,. 다음 코드처럼 PyQt5로 테이블을 만드는 중에 데이블 안의 아이템안에 체크박스를 넣게 되었다. geometry() and friends only return a QSize object describing the geometry of the contained window rather than the containing window. Here are the examples of the python api PyQt5. After ‘configuration’, it will create another type of window. The final application will look like this QTDesigner work Using QTDesigner, I created: 1 QWidget ui named tab1. QWheelEvent. Antonio Moreno May 8, 2016 at 8:43 PM. They are extracted from open source Python projects. With the increased interest in using Qt from the Python programming language, I asked one of our developers to reproduce the same example, but implement the widget in Python with PyQt. There are a lot of new concepts you need to understand to get anything to work. This handle can be pulled back and forth. layout ile örneğini aldığımız QVBoxLayout yerleştirme aracını da QWidget'e bu pencerenin yerleştirme yöneticisi olduğunu belirtmiş oluyoruz:. childAt() exception Stephen Gava 2013/10/03 [PyQt] pyqt5. What we'll do is build an application together and get familiar with the common parts of a PyQt application. QtCore import Qt #from PyQt5. spend tons of class time learning about PyQt's~1000 classes but we won't. PyQt5 widgets QCheckBox. The widget is the atom of the user interface: it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen. This shows basic widget creation, though most programs will tend to create and instantiate subclasses of QWidget or other widget classes for their main user interfaces. 如前一篇笔记,我们还是只讨论两层嵌套布局的情况。 前面的布局有一个缺点:有三个内层布局,则需要三个空部件。那若有. QtWidgets: class QWidget(PyQt5. childAt() exception Stephen Gava 2013/10/03 [PyQt] pyqt5. It even covers creating an installer for your app. exe has now been moved to pyqt5_tools\Qt\bin but can also be found in the \Scripts\ folder in the root of your Python installation. w = QWidget() The QWidget widget is the base class of all user interface objects in PyQt5. Do you know about Python Iterators. pyqt menubar. This is my Hangman game that I created using PyQt5 and Python 3. Is there a difference between QFileDialog strings in PyQt4 and PyQt5? I have a block of code that opens a QFileDialog using Python3 and PyQt5: from PyQt5. I'm not sure if this is a pylint issue or something else. A toggle button is a QPushButton in a special mode. 6 $ python configure. They are extracted from open source Python projects. # Try not to include more than what you actually need from sys import exit as sysExit from PyQt5. QtWidgets import QApplication, QWidget SystemError: initialization of QtWidgets failed without raising an exception What I have tried: I installed QT but also installed PyQt5 and Sip Via Homebrew and Pip. 这篇文章主要介绍了python使用PyQt5的简单方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧. Python scripts can be run from the shell. QWidget¶ class PyQt5. PyQt5 supports multimedia, including a video widget: QVideoWidget. PyQt is a python binding of the open-source widget-toolkit Qt, which also functions as a cross-platform application development framework. argv parameter is a list of arguments from a command line. Getting 'NameError: 'QtWidgets' is not defined" Have done the following: sudo apt-get install python3-pyqt5 verified this with following. py #PySide #PyQt. QtWidgets import QApplication, QWidget # Кожна PyQt-програма повинна створити базовий об'єкт застосунка. The final application will look like this QTDesigner work Using QTDesigner, I created: 1 QWidget ui named tab1. It provides the default constructor for QWidget. Welcome to Create Simple GUI Applications the practical guide to building professional desktop applications with Python & Qt. This is pure c++ book. #!/usr/bin/evn python3 # -*- coding: utf-8 -*- import sys from PyQt5. OpenTutorials_PyQt / QtFramework / QtWidgets / QWidget / QWidget_opacity. A menubar can be constructed with QMenuBar(). QtWidgets import QLabel from PyQt5. The default constructor has no parent. Toggle button. If it is nullptr (the default), the new widget will be a window. Please try again later. Detailed Description. We'll talk a bit about the kinds of objects they use, and talk through a couple of very simple examples that will give you a basic idea of how Python/Qt applications are constructed. In this tutorial we'll create simple web browser using Python PyQt framework. But the problem is, that the Dilaog is. It even covers creating an installer for your app. You can vote up the examples you like or vote down the ones you don't like. emit(SIGNAL("mySignalName"), myarg). ui 1 QWidget ui named tab2. The app we write will show the message “Hello World” in a graphical window. This program will work equally well using Qt4 and Qt5. I show you how to install PyQt5, how to use the designer, how to convert. PyQt - multiple window instances?. QWidget is the base class of all user interface objects in PyQt5. ui 1 QWidget ui named tab2. Qt library is an excellent GUI library for C++ programmers developed by Nokia and now is an open source project. All of those import statements involving PyQt 5 are the result of much trial and error, but they cover everything I needed. All UI elements that Qt provides are either subclasses of QWidget, or are used in connection with a QWidget subclass. The function initiation has carried the basic configurations values of building Windows such as title, X, and Y coordination. QtWidgets import QApplication, QWidget 8 9 # Every PyQt5 application must create an application object. Introduction. For some reason Atom-Script can’t find the PyQt5 modules. PyQtでの描画処理について PyQtでグラフィックス処理をするには、主に以下のような方法があります。 QWidgetの描画処理をオーバーライド:単純なグラフィック描画や自作のウィジェットとして描画する QGraphicsItemの使用:Qtに備わった複数のグラフィックを扱うフレームワーク OpenGLを使用:Open…. What's the right way to open and close dialog windows multiple times? At the moment I instantiate a dialog window on a clicked button signal, then close it with self. Both ways to change the background color of QWidget have been successfully built using Qt SDK 1. PyQt5 Download. QWheelEvent. 2 to avoid GeoJSON fields to be unset (fixes #16812) Matthias Kuhn 2017-07-07 Support for PyQt5 Blottiere Paul 2017-07-04 [bugfix] Fixes relation widget. The addRandomTextSlot( self ) addition is the slot we attached to the Random Text push-button in the GUI, using Designer. QWheelEvent. tab completion). QLabel(w) The first label labelA is a QtWidgets. All of those import statements involving PyQt 5 are the result of much trial and error, but they cover everything I needed. Introducción Para usar botones con una aplicación PyQt5, necesitamos actualizar nuestra línea de importación:. # Description: pyqt5 gui and opening files # pythonprogramming. 14 # We provide the default. Normally, pressing the TAB key changes focus among widgets. After a selcetion of users and the ouput format, I will open a Filedialog to chouse the Filename and the path. QT5 and PyQt5 provide a large collection of available widgets and can be expected to be under active development for the foreseeable future. Siccome il groupbox può ospitare un widget soltanto, volendo raggruppare più widget (es. QTableWidget PyQt에서 제공하는 표 위젯은 편집과 선택이 가능한 표를 제공합니다. QtGui import QPixmap class Example. Is it possible to make a closed-source application with Qt and PyQt5, using the open source licenses available for those libraries, in the way described below?. [PyQt] PyQt5 custom video player using QAbstractVideoSurface Timothy W. QtGui' has no attribute 'QWidget'. It has approximately ~1000 classes divided into a set of ~38 modules. I created a QWidget, which serves as the space to place the letters and contains a QButton labeled "Next" to proceed the next glyph. I normally use Cygwin just to ssh onto my school's Linux machines, but they do not have PyQt5 installed and I do not have permissions to install it on those machines. #!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Nov 17 16:09:09 2018 @author: mjandr """ #%% signals and slots from PyQt5. ok, in this case you should reimplement (and you have already done this) closeEvent and just hide a widget using QWidget::hide. There exists very good tool support for the combination of QT5 and PyQt5; Finally and very importantly: In lesson 4 we will continue with the GUI development started in this lesson in the context of QGIS 3. QDialog is used for asking the user about something, like asking the user to accept or reject something or maybe asking for an input and is based on QWidget. The button can be created by calling the constructor QPushButton with the text to display as parameter. 예제로 배우는 PyQt는 사용자의 궁금증을 빠르게 해소할 수 없을까 하는 생각에서 시작되었습니다. 5 > Qt Widgets > C++ Classes > QWidget PyQt5ではウェジェットでウィンドウを作成し, その中にボタンやラベルなどの部品を配置していきます.. 3 Comments → Homebrew & Pyenv: Installing PyQT5 with Python3 on OSX. We then test our. PyQt5学习笔记04 - QWidget窗口控件基类 2019. #!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Nov 17 16:09:09 2018 @author: mjandr """ #%% signals and slots from PyQt5. It lets Python developers utilize the full potential of Qt, with the support of The Qt Company. This shows basic widget creation, though most programs will tend to create and instantiate subclasses of QWidget or other widget classes for their main user interfaces. After reading this blog i very strong in this topics and this blog really helpful to all. In this tutorial we will learn how to Add tab to QTabWidget. They are extracted from open source Python projects. 메모장을 만들어 가며 배워보자 윈도우 메모장(notepad)를 PyQt로 작성 * 위젯의 최상위 QWidget 에 대한 이해 *창 위젯 생성 및 설정 *기본 위젯 사용 *시그널과 슬롯의 이해와 사용 *사용자 커스텀 위젯 생성 및 이해 *사용자 정의 시그널과 슬롯 *국제화 i18n. pyqt python pyqt5 example pyside2 tutorial designer get examples tkinter install EventFilter on QWidget(qt4. Lines 5-6: The default constructor for QWidget. 11 (El Capitan) and Linux with Python 3. Hm, it worries me that you ask. QWidget class is the base class of all user interface objects. By voting up you can indicate which examples are most useful and appropriate. Every PyQt5 application must create an application object. It allows you to create GUI applications as well as provides libraries for networking, In this tutorial, we will focus on some of the very core aspects of using PyQt5 and how to package it for distribution. # Базові віджети знаходяться в модулі QtWidgets (для версії PyQt4 це модуль QtGUI). It may be a single line message, an “are you sure you want to save?” message or something more advanced. But how to realize the download progress bar with the download function? This article mainly refers to< PyQt5 Implementation of Download Progress Bar > Thank you for sharing this article. You can vote up the examples you like or vote down the ones you don't like. It creates a new PushButton class that inherits from the base class, QWidget. PyQtGraph Data science is one of the post popular uses of Python, and building dashboards and analysis tools is a common use case of PyQt5. 3 Comments → Homebrew & Pyenv: Installing PyQT5 with Python3 on OSX. So I can open the dialog only once. How can I open dialogs more than once? Thank you. Introducción Para usar botones con una aplicación PyQt5, necesitamos actualizar nuestra línea de importación:. QtWidgets import QApplication, QWidget 8 9 # Every PyQt5 application must create an application object. Other information that might help, but also might make you cringe: I am on Windows and using Cygwin. Python scripts can be run from the shell. QtCore import QCoreApplication. QtWidgets import (QApplication, QWidget, QScrollAreaQScrollArea. Both ways to change the background color of QWidget have been successfully built using Qt SDK 1. PyQt5 can be used to create graphical interfaces with Python. This is the generic form of a Qt widget. PyQtGraph Data science is one of the post popular uses of Python, and building dashboards and analysis tools is a common use case of PyQt5. 11 app = QApplication (sys. Next topic. Creating custom widgets is done by subclassing QWidget or a suitable subclass and reimplementing the virtual event handlers. childAt() exception Phil Thompson; Re: [PyQt] pyqt5. Step 1 – File->Other Project->Empty Qt Project. こちらのサイトを日本語でざっくりとまとめていきます. Line 4: QWidget is the base class of all user interface objects in PyQt5, so you are creating a new Form class that inherits from the base class, QWidget. QtGui' has no attribute 'QWidget'. This is used in combination with the class QMediaPlayer. Maya 2017 was released today and with it comes a big change; PySide (and PyQt4) no longer works with Maya. After 'configuration', it will create another type of window. It creates a new PushButton class that inherits from the base class, QWidget. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. I've written about Getting started with PyQt in one of my previous blog posts, and the post covers the basics of getting Qt Designer and PyQt in general up and running - check it out if you haven't already. How do I structure this program so that I am able to spawn a QWidget object on start-up? Moreover, how do I make it so that each time I click on the System Tray Icon (namely mediaIcon. QtWidgets import QPlainTextEdit, QHBoxLayout class CenterObject(QPlainTextEdit): # This of course handles our core object from which. One of the download threads, the basic seals of UTF-8. PyQt5 supports buttons using the QPushButton class. Widgets in a layout. py - Notepad++ File Edit Search View Encoding Language Settings Macro Run Plugins Window ? QMK py 42. Il GroupBox è un contenitore con titolo e bordo, che permette di raggruppare elementi. QWheelEvent. Lines 5-6: The default constructor for QWidget. Matplotlib教程(三)之PyQt5展示,程序员大本营,技术文章内容聚合第一站。. PyQt - QLabel Widget - A QLabel object acts as a placeholder to display non-editable text or image, or a movie of animated GIF. All UI elements that Qt provides are either subclasses of QWidget, or are used in connection with a QWidget subclass. The default constructor has no parent. There are some differences, and kenwaldek has ported this series code, by individual tutorial code, to PyQt5 here. Qt,C++,QWidget,Image. Working with PySide in Maya PySide and PyQt are very similar, and the two use almost the identical API. QWidget is the base class of all user interface objects in PyQt5. The C++ documentation can be found here. QPushButton è il widget relativo al bottone. First of all, we need to import PyQt5 packages for handling application window, push-button, and Message Box from the PyQt5 Widgets. The app we write will show the message “Hello World” in a graphical window. For some reason Atom-Script can’t find the PyQt5 modules. It seems insignificant, sure, but if you want pixel-perfect alignment, you have to use something else: QWidget. They are extracted from open source Python projects. The addRandomTextSlot( self ) addition is the slot we attached to the Random Text push-button in the GUI, using Designer. To do this we're going to take the skeleton of our application and replace the QLabel with a QWidget. frameSize() frameSize() will return the size of the entire window, border. QWidget *parent = \nullptr is the parent of the new widget. PyQt5 Download. Alignment alignment = 0) The third and fourth parameters are row and column spanning, equal to one by default. It also helps in the efficient use of windowâ s client area. The examples show a tooltip and an icon, close a window, show a message box and center a window on the desktop. Lines 7-9: Here we add a label, a text edit box and a submit button. Get the SourceForge newsletter. A PyQt4 tutorial is included in the old lecture but the details aren't very different. After reading this blog i very strong in this topics and this blog really helpful to all. 2013/10/03 [PyQt] pyqt5. This guide explains how to deal with that and make your Python and PySide/PyQt scripts compatible with Maya 2017 as well as older Maya versions. Python/PyQt5 2019. Creates a new table view with the given rows and columns, and with the given parent. It may be a single line message, an "are you sure you want to save?" message or something more advanced. The following are code examples for showing how to use PyQt5. 예제 작성 과정 #1 - Qt Designer를 이용하여 폼 제작 후, 시그널 슬롯 연결하기. QWheelEvent. To include the definitions of modules classes, use the following directive:. The addRandomTextSlot( self ) addition is the slot we attached to the Random Text push-button in the GUI, using Designer. Dealing with Maya 2017 and PySide2 25 Jul 2016 #Python #Maya #Qt. QWidget¶ class PyQt5. What we'll do is build an application together and get familiar with the common parts of a PyQt application. Python/PyQt5 2019. The button can be created by calling the constructor QPushButton with the text to display as parameter. It seems insignificant, sure, but if you want pixel-perfect alignment, you have to use something else: QWidget. 1st try: Python shell (outside PyCharm) and pip install PyQT5 --> installs fine, but PyCharm did not find any PyQT module for import. If you have purchased a commercial PyQt license then please login to your account using the details sent to you at the time of purchase. A toggle button is a QPushButton in a special mode. This is usually only wanted for one window in the application, the primary window. This example was ported from the PyQt4 version by Guðjón Guðjónsson. PyQt5: Threading, Signals and Slots. C++ documentation. In this tutorial we'll create simple web browser using Python PyQt framework. QWidget is the base class of all user interface objects in PyQt5. Usage of these opportunities is. I often forget how to do this so I'm documenting it here for future reference. QWidget class is the base class of all user interface objects. As shown in the screenshot below. ui Those files are saved in the. 13 20:18 qtDesigner 새 폼을 생성할 때, 다음과 같은 창이. Messages by Thread [PyQt] PyQt 5. QtWidgets import QApplication from PyQt5. Below are instructions on how to embed the Qwidget into the most popular Content Management. PyQt5 имеет богатый набор готовых виджетов. It even covers creating an installer for your app. QWidget¶ class PyQt5. Toggle button. Nous allons étudier la programmation des interfaces graphiques (en anglais, on parle de GUI : Graphical User Interface) grâce à PyQt5 qui permet d’utiliser la bibliothèque Qt version 5 avec Python. If it is nullptr (the default), the new widget will be a window. argv) 12 13 # The QWidget widget is the base class of all user interface objects in PyQt5. What's the right way to open and close dialog windows multiple times? At the moment I instantiate a dialog window on a clicked button signal, then close it with self. Qt itself is written in C++. I want to say thanks to you for taking out time and reading my code and helping me out a very handful of programmers do that. Its a horizontal bar with buttons items, typically file menu and others. QWidget class is the base class of all user interface objects. < How to Change the Background Color of QWidget. In this tutorial we'll create simple web browser using Python PyQt framework. I want to create an interface PyQt that run my script functions. It creates a new PushButton class that inherits from the base class, QWidget. This example adds a menubar and textbox to a PyQt window. Here are the examples of the python api PyQt5. Getting 'NameError: 'QtWidgets' is not defined" Have done the following: sudo apt-get install python3-pyqt5 verified this with following. addWidget (self, QWidget, row, column, rowSpan, columnSpan, Qt. initUI def initUI (self): # QPushButtonの第一引数はラベル # QPushButtonの第二引数は親ウィジェット(QWidgetに継承されたExampleウィジェット). If I want to emit a signal and also pass an argument with that signal, I can use the form self. I show you how to install PyQt5, how to use the designer, how to convert. Next topic. Qt Quickスターターブック―Qt5. tabWidget, 0) #. As a note, we'll be using PyQt5 in this lecture. PyQt5 supports buttons using the QPushButton class. PyQt5 has a wide range of various widgets, including buttons, check boxes, sliders, or list boxes. 10 # The application object is located in the QtWidgets module. I will cover part 3 of the address book tutorial. Other information that might help, but also might make you cringe: I am on Windows and using Cygwin. The default constructor has no parent. Step 1 – File->Other Project->Empty Qt Project. If you require portability in your application, this can make your life a lot easier. PyQt5 supports (native) file dialogs: open file, open files and save file. We provide the default constructor for QWidget. PyQt5 can be used to create graphical interfaces with Python. 4, inside a virtual environment. Creates a new table view with the given rows and columns, and with the given parent. We'll talk a bit about the kinds of objects they use, and talk through a couple of very simple examples that will give you a basic idea of how Python/Qt applications are constructed. Here are the examples of the python api PyQt5. QtCore import QCoreApplication, Qt from PyQt5. QWidget" Because we are running this program using PyQt5 and the widgets it includes you need to notify your code to pull all of these QWidgets from the QtWidgets module. QWidgetAction. This simple example of building a PyQt GUI application with the QThread class can be as a good demonstration of the launch of flexible and fast python based GUI`s. childAt() exception Stephen Gava. 파이썬으로 프로그램을 만드는 도중 GUI 를 넣고 싶어졌다. Thanks for this. QWidget" Because we are running this program using PyQt5 and the widgets it includes you need to notify your code to pull all of these QWidgets from the QtWidgets module. Step 1 – File->Other Project->Empty Qt Project. QtWidgets import QPlainTextEdit, QHBoxLayout class CenterObject(QPlainTextEdit): # This of course handles our core object from which. Esta clase está dentro del grupo PyQt5. argv) 12 13 # The QWidget widget is the base class of all user interface objects in PyQt5. Open up an interpreter and import PyQt5 to make sure everything’s working. This is a little popup window that you’ve often seen on your desktop. First programs in PyQt5. Related course: Create GUI Apps with PyQt5; pyqt window flags. 13 20:18 qtDesigner 새 폼을 생성할 때, 다음과 같은 창이. Get notifications on updates for this project. 11 app = QApplication (sys. QTableWidget. What we'll do is build an application together and get familiar with the common parts of a PyQt application. 上期我们介绍了PyQt5的事件与信号,主要涉及到了以下几个知识点: 信号与槽连接事件处理重写事件发送者发出自定义信号 今天我们主要讲解一下布局的知识 -----华丽…. layout ile örneğini aldığımız QVBoxLayout yerleştirme aracını da QWidget'e bu pencerenin yerleştirme yöneticisi olduğunu belirtmiş oluyoruz:. The following are code examples for showing how to use PyQt5. This simple example of building a PyQt GUI application with the QThread class can be as a good demonstration of the launch of flexible and fast python based GUI`s. But how to realize the download progress bar with the download function? This article mainly refers to< PyQt5 Implementation of Download Progress Bar > Thank you for sharing this article. Ruby on Rails Online Training. Is there a concrete example where PyCharm is used to develop a PyQt5 application that runs on the Raspberry Pi 3? I am able to create a PyQt5 based project in the Windows environment with no problem but I am unable to change the environment to the Raspberry Pi and run the project without errors. All of those import statements involving PyQt 5 are the result of much trial and error, but they cover everything I needed. Qt itself is written in C++. QtCore import Qt #from PyQt5. Qt | Cross-platform software development for embedded & desktop. The following are code examples for showing how to use PyQt5. I used QTDesigner to make the UI, then PyQt5 to convert it to python, and edited the code. PyQt - QStackedWidget - Functioning of QStackedWidget is similar to QTabWidget. A PyQt4 tutorial is included in the old lecture but the details aren't very different. 4, inside a virtual environment. 1st try: Python shell (outside PyCharm) and pip install PyQT5 --> installs fine, but PyCharm did not find any PyQT module for import. If you want to learn how to write GUI applications it can be pretty tricky to get started. ok, in this case you should reimplement (and you have already done this) closeEvent and just hide a widget using QWidget::hide. QWheelEvent. こちらのサイトを日本語でざっくりとまとめていきます. In the constructor of our class, we first call the constructor of the base class (line 6) and then set up the GUI of our widget. Maya 2017 was released today and with it comes a big change; PySide (and PyQt4) no longer works with Maya. This example was ported from the PyQt4 version by Guðjón Guðjónsson. keyPressEvent taken from open source projects. QTableWidget PyQt에서 제공하는 표 위젯은 편집과 선택이 가능한 표를 제공합니다. A PyQt window can be configured using window flags. What we'll do is build an application together and get familiar with the common parts of a PyQt application. PyQt works hard to shield you from cross-platform differences. QtWidgets import QWidget from pyqt_led import. First programs in PyQt5. The examples show a tooltip and an icon, close a window, show a message box and center a window on the desktop. gz $ tar -xvf PyQt5_gpl-5. The pyuic5 utility does not seem to generate code for it, and it's left up to us to do. This is my Hangman game that I created using PyQt5 and Python 3. Esta clase está dentro del grupo PyQt5. QWidget不含边框的常用函数.