qt5

QOpenGLFunctions missing important OpenGL functions

梦想与她 提交于 2020-01-03 13:05:11
问题 QOpenGLFunctions seems to be missing important functions such as glInvalidateFramebuffer and glMapBuffer. From what I understand QOpenGLFunctions loads the intersection of both desktop OpenGL functions and ES functions. If that's the case, why aren't these two functions present? From what I can tell glMapBuffer is in both. Am I misunderstanding QOpenGLFunctions, or are they actually missing functions(unlikely)? 回答1: There are multiple reasons for those two cases and the one in the comment: 1)

How to rotate a Qt5 application using the linux framebuffer?

落爺英雄遲暮 提交于 2020-01-03 12:58:41
问题 I have an embedded linux application running directly on the linux framebuffer (no x-Windows). We now have to physically rotate the display 180 degrees. How do I get my Qt application to rotate so it doesn't appear upside down? I saw reference to using the following option: -platform linuxfb:fb=/dev/fb0:rotation:180 However, the rotation option seems to be ignored. Using Qt 5.9.2 on Ubuntu server 16.04.6 回答1: You could handle it on application level. With QML thats easy, but with QWidgets the

Deploying PyQt5 application to Android via pyqtdeploy and Qt5

China☆狼群 提交于 2020-01-03 08:15:07
问题 Is it possible? I mean, yeah, pyqtdeploy intro page said: "pyqtdeploy is a tool for deploying PyQt applications. It supports deployment to desktop platforms (Linux, Windows and OS/X) and to mobile platforms (iOS, Android and Windows RT)." I've installed Qt 5.3.0 for Android and all it's prerequisites (SDK, NDK, etc.). Also I made test project with simple button and label in QtCreator for testing deployment. Everything is fine. Next step was trying pyqtdeploy for making Qt project, pretty

How to get the contentSize of a web page in Qt5.4-QtWebEngine

梦想与她 提交于 2020-01-02 12:48:07
问题 I'm using the new Qt5.4 with the module QtWebEngine and from what I see mainFrame() doesn't exists anymore. How to get the contentSize/size of the page and how to render it now? I tried with the setView and view but doesn't work. 回答1: Check if the QWebEnginePage::geometryChangeRequested signal does what you want. Also you display a QWebEnginePage by creating a QWebEngineView (it's a QWidget ) and calling QWebEngineView::setPage(yourPage) . 回答2: I couldn't find any native Qt method for that,

How to get the contentSize of a web page in Qt5.4-QtWebEngine

房东的猫 提交于 2020-01-02 12:48:04
问题 I'm using the new Qt5.4 with the module QtWebEngine and from what I see mainFrame() doesn't exists anymore. How to get the contentSize/size of the page and how to render it now? I tried with the setView and view but doesn't work. 回答1: Check if the QWebEnginePage::geometryChangeRequested signal does what you want. Also you display a QWebEnginePage by creating a QWebEngineView (it's a QWidget ) and calling QWebEngineView::setPage(yourPage) . 回答2: I couldn't find any native Qt method for that,

I cannot build and run a simple Qt 5 application,

被刻印的时光 ゝ 提交于 2020-01-02 08:43:19
问题 I downloaded and installed Qt 5 on Windows 7. I opened QtCreator 2.6.1 and created a new simple GUI application. When I try to run it, it says: “C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore\qglobal.h:46: error: C1083: Cannot open include file: ‘stddef.h’: No such file or directory” What is the problem and how do I solve it? My compiler is: MSVC2010 32 bit 回答1: A google search yielded the following: http://qt-project.org/forums/viewthread/10255 This thread notes that this error happens when you

How to port Qt4.6 Phonon based media-application to Qt 5.1?

左心房为你撑大大i 提交于 2020-01-02 07:10:17
问题 I have a Qt 4.6 based application which use QtWebView to load a HTML page with tag inside to play a network multimedia source on Windows platform. Instead of using the default PHONON playback engine i build another PHONON back-end engine to handle the media download, demuxer,decoder, rendering etc. It works pretty well. However i need to update to Qt 5.1 to benefit the improvement and bug fix in latest QtWebView. From Qt 4.8 PHONON was dropped and when porting to Qt 5.1 my self implemented

GDB pretty printers for Qt5

江枫思渺然 提交于 2020-01-01 09:27:11
问题 Where I can find gdb pretty printers for qt5? I could find only for qt4 on kde developer site. Maybe somebody knows whether pretty printers for new version of Qt exist and where I can find them. I know that it's possible to use latest version of QtCreator, but I need just plain python scripts for GDB. 回答1: The pretty printers listed on https://techbase.kde.org/Development/Tutorials/Debugging/Debugging_with_GDB are only partially compatible with Qt 5. Some types (such a QByteArray) are not

Qt 5.4/Qml: Prevent binding loop

谁都会走 提交于 2020-01-01 09:10:10
问题 I have a global singleton "Settings" which holds application settings. When I try to run the following code I get a QML CheckBox: Binding loop detected for property "checked" : CheckBox { checked: Settings.someSetting onCheckedChanged: { Settings.someSetting = checked; } } It is obvious why this error occurs, but how can I correctly implement this functionality without a binding loop? E.g. I want to save the current checked state of the checkbox in the settings singleton. I am using Qt 5.4

How to pretty-print QString with GoogleTest framework?

青春壹個敷衍的年華 提交于 2020-01-01 04:38:26
问题 I am using the GoogleTest (GTest) framework in conjunction with a Qt5 application. Whenever a test fails using a QString argument, the framework tries to print all the involved values. However, it cannot automatically handle foreign types (Qt5's QString in this case). QString test = "Test"; ASSERT_EQ(test, "Value"); How can I get GoogleTest to pretty print QStrings automatically (= without having to manually convert them each time)? 回答1: The GoogleTest Guide explains how you can in general