qt5

QML ScrollView with ColumnLayout

可紊 提交于 2020-01-11 05:13:09
问题 I am trying to create a scroll view around a ColumnLayout, unfortunately my current code doesn't work. I know about ListView, but in my case I need to create scrollable Layout, because it will contain heterogeneous elements. ApplicationWindow { id: mainwindow title: qsTr("Hello World") width: 300 height: 300 visible: true ScrollView { anchors.fill: parent ColumnLayout { width: mainwindow.width Image { anchors.bottomMargin: 10 source: "img/button.jpg" width: parent.width height: 400 } Image {

Repeating Q_DISABLE_COPY in QObject derived classes

半世苍凉 提交于 2020-01-11 04:28:08
问题 In Qt there is a macro that allows declaring private copy constructurs and assignment operators for classes: http://qt-project.org/doc/qt-5.0/qtcore/qobject.html#Q_DISABLE_COPY It is said that this macro should be used for all QObject (especially QWidget) derived classes. I understand how this works and why it is useful. What I do not understand: Is there any reason to repeat Q_DISABLE_COPY in my QObject derived classes while QObject already contains Q_DISABLE_COPY and through this

How to send signals between tabs of TabView (Qt5)

回眸只為那壹抹淺笑 提交于 2020-01-11 04:05:15
问题 I have TabView with two tabs. Each tab has Item element (which contains other stuff). I need to send signal from one tab and to catch (to handle) it in other tab. If I try to send signal from one Tab (Item) to other - it doesn't work, without showing of any errors. I found a way to send signal out from tab to TabView scope using Connections as written here (http://qt-project.org/doc/qt-5/qml-qtquick-loader.html). declare in the first tab signal: signal message() Make a call in this tab (in

Put transparent QWidget on top of QMediaView in QT5 on Ubuntu

ぃ、小莉子 提交于 2020-01-10 19:14:39
问题 Goal I want the background of my QT5 based GUI to be a video file that is playing. I also want to be able to style my GUI components with transparency so that the video will show through them. I am not sure if this is at all possible to accomplish. It could be that i've just missed an important clue (I am after all a Qt beginner), or it could be that it just simply was not meant to work. But being an optimist, I have given it my best try. First attempt My minimal first attempt looked like

Put transparent QWidget on top of QMediaView in QT5 on Ubuntu

一曲冷凌霜 提交于 2020-01-10 19:13:02
问题 Goal I want the background of my QT5 based GUI to be a video file that is playing. I also want to be able to style my GUI components with transparency so that the video will show through them. I am not sure if this is at all possible to accomplish. It could be that i've just missed an important clue (I am after all a Qt beginner), or it could be that it just simply was not meant to work. But being an optimist, I have given it my best try. First attempt My minimal first attempt looked like

Statically linked app with Qt gives error: Failed to load platform plugin “windows”

本秂侑毒 提交于 2020-01-10 14:12:33
问题 I have built Qt 5.0.1 statically in VS 2010 under Windows 7 x64. The configuration parameters were configure -debug-and-release -opensource -confirm-license -platform win32-msvc2010 -nomake examples -nomake tests -no-webkit -static and I performed the build with jom with following parameters: jom -j 4 The build process was successful and I can find all the libs and link my app with Qt statically. Now the problem is that when I try to run the application, it gives me an error Module: 5.0.1

Difference in opengl speed between Qt 4/5 and Opengl API

帅比萌擦擦* 提交于 2020-01-10 07:27:06
问题 I have read all the questions on SO that i could find about qt 4 and 5 opengl. This one came the closest OpenGL vs QOpenGL/QtOpenGL in Qt 5: differences and limitations? , I have no idea why it was closed because its a great question. The only aspect I see it missing is the speed difference. I have also read this https://qt-project.org/forums/viewthread/22921 which had a similar question, but as the back and forth about 4 vs 5, mostly discussing new features. My question is, is using the

Automatically include Qt libraries in the .app bundle deploying on Mac

﹥>﹥吖頭↗ 提交于 2020-01-10 01:59:24
问题 I am using Qt Creator to deploy my Qt application. On Mac, I'd like to include the required Qt libraries in the .app bundle. Is there any way to do it automatically using Qt Creator? Should I do it using the command-line? In that case, how should I do it? 回答1: The macdeployqt command line tool will add all the necessary Qt libraries that your Qt project references. If you require any other, 3rd party libraries, you'll need to copy these manually and set the paths to them using the install

Automatically include Qt libraries in the .app bundle deploying on Mac

南楼画角 提交于 2020-01-10 01:59:22
问题 I am using Qt Creator to deploy my Qt application. On Mac, I'd like to include the required Qt libraries in the .app bundle. Is there any way to do it automatically using Qt Creator? Should I do it using the command-line? In that case, how should I do it? 回答1: The macdeployqt command line tool will add all the necessary Qt libraries that your Qt project references. If you require any other, 3rd party libraries, you'll need to copy these manually and set the paths to them using the install

VTK编译(VTK-8.2.0)

冷暖自知 提交于 2020-01-07 08:42:21
1.安装VS2019 2.安装QT5.12 3.下载CMake https://cmake.org/download/ https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2-win64-x64.zip 4.下载VTK库 https://vtk.org https://vtk.org/files/release/8.2/VTK-8.2.0.zip 5. 将下载后的文件解压到如下目录 E:\osg\VTK\VTK-8.2.0 6.应用CMake 参数设置如下: BUILD_EXAMPLES 如果想学习官方示例程序,那么就勾选上 CMAKE_INSTALL_PREFIX 这个表示vtk最后生成的链接库的位置,将其修改为:E:/osg/VTK/VTK VTK_Group_Imaging 勾选上 VTK_Group_Qt 勾选上 VTK_RENDERING_BACKEND设置为OpenGL 点击Add Entry,添加CMAKE_DEBUG_POSTFIX,Value设置为_debug(用来区别debug和release版本) 设定QT5的路径: D:/GISSoft/Qt/Qt5.12.3/5.12.3/msvc2017_64/lib/cmake/Qt5 再次点击configure,如无error