Questions tagged [qt]

32639 questions
1

votes
0

answer
336

Views

AMD GPU not recognised with OpenCL - Ubuntu

I'm trying to recognize my AMD FirePro W5100 GPU with OpenCl on Ubuntu 16.04. I'm using: AMD APP SDK 3.0 https://developer.amd.com/amd-accelerated-parallel-processing-app-sdk/ GPU latest driver for Ubuntu 16.04 http://support.amd.com/en-us/download/workstation?os=Linux%20x86_64#pro-driver Running cl...
Izzy88
1

votes
0

answer
75

Views

PyQt4 not found, despite file existing on the backend folder.

I am trying to run a code to get an interactive GUI. However, I get the following error while trying to use %matplotlib qt: So, I tried using %matplotlib qt5 and the problem still persists. I've checked the backends folder. I seem to have both backend_qt4agg and backend_qt5agg. I am using Conda 4....
hegdep
1

votes
0

answer
151

Views

Dynamically add PropertyChanges to a State in QML

Is it possible to extend or dynamically add property changes to a qml state? For example Item { id: myItem; state: 'opened'; states: [ State { name: 'opened'; PropertyChanges { target: myItem; height: 100; } }, State { name: 'closed'; PropertyChanges { target: myItem; height: 10; } } ] } but later I...
Brian
1

votes
1

answer
156

Views

Maya 2018 Python+QT: Querying Value of Imported TextField

I've been following This Tutorial on using a .UI file from QT designer in a Maya plugin. It states that, in order to query the value of a QtextEdit field after the UI has been loaded into Maya, I need to do the following: So now when we load our QT Ui inside of maya we can query the text of our line...
Design Runner
1

votes
0

answer
126

Views

Qt5. How to load xsd schema from resources.qrc?

I want load xsd schema from my resources.qrc file. This part from *.qrc: xml/my-custom.xsd This xsd is VALID (tested on W3C validator)! I not want load this schema from local file. Because i want compile it as resource. My target: single executable file without other files and not required installat...
Deep
1

votes
0

answer
157

Views

Handling touch events in a QML game

Part of my game includes a table in which there is a ball rotating. There are also two rectangles like rackets that a player can use for the game. At first I used a simple rectangle with a mouse area filling the racket and some drag properties. It was somewhat fine when I ran the program on my Deskt...
Franky
1

votes
1

answer
814

Views

Adjusting the width of QLineEdit to contents (and getting shorter than expected)

I have a similar issue as in this question, but the answer to that does not work well for me. I have a QLineEdit element with a short piece of text, and I want this element to be adjusted in width to the contents, so that the text fits right into the element, without extra spaces or hidden letters....
Maximko
1

votes
0

answer
226

Views

Parent Qt to non-qt window with PyQt

I am trying to parent a QMainWindow to a non-qt application (the application may change). Any ideas on how to do this? The qt window opens fine and i can interact with the python API in the applications however the qt window goes behind the application window if i click on the application. I could u...
Mafster
1

votes
1

answer
106

Views

How to make QLineEdit editing enabled while text comes from a QPushButton?

In my project, I am using two QPushButton and two QLineEdit. I am connecting these QPushButton with these QLineEdit in such a way, so that QPushButton allow the user to select a folder from hard drive and after selection, the corresponding QLineEdit will display the URL path of the selected folder....
Sanakum
1

votes
1

answer
550

Views

How to set Value Axis Label Format on QML from milliseconds to mm:ss?

Background I am using QtCreator and I have a file called myScopeView.qml, which represents a scope view similar to the example provided here. In myScopeView.qml, there is a ChartView that is updated every second with a timer so the plot changes values on X axis and Y axis. X axis represents time exp...
titiro89
1

votes
1

answer
224

Views

Add button to QVideoWidget

everyone! I try to set a click property to a QMediaPlayer Element, but I can not find the mode to make it, and if I try to put a button in front to Video, the button puts behind to video, even with button->raise(); videoWidget->lower(); And If I put a Button to fullscreen the screen turns in black...
Aarón Gutiérrez
1

votes
1

answer
28

Views

Synchronize selection of sortable QTableWidgets

I have two QTableWidgets, having the same number of rows and columns. Now, every selection in one table should automatically update the selection in the other and vice versa. The following code works fine, with one exception: #include #include #include #include QTableWidget* create() { auto tabl...
Aleph0
1

votes
0

answer
49

Views

Qt and manual input events

I am trying to process manually created input event like this: class WebView : public QWebView { Q_OBJECT public: ... Q_INVOKABLE bool ProcessEvent(QEvent *ev) { bool res = this->event(ev); delete ev; return res; } ... }; And send it from another thread like this: QEvent *ev = new QMouseEvent{ QEven...
user1188351
1

votes
0

answer
463

Views

Qt http post way “Protocol \”\“ is unknown”

void MainWindow::start() { QNetworkAccessManager* manager = new QNetworkAccessManager; QJsonObject obj; obj.insert('pro', 2005); obj.insert('id', 10010033); QNetworkRequest req; req.setUrl(QUrl('192.168.90.114:38080/udp/data')); req.setRawHeader('Accept-Encoding', 'gzip, deflate'); req.setRawHeader(...
Shijiang.Guo
1

votes
1

answer
224

Views

Ubuntu SDK needs LXD

I need to create very simple GUI application in Linux. For this reason I have installed Ubuntu SDK on my Ubuntu 16. During first run it was trying to create LDX container. Why it needs this container? Got error below: Generating a client certificate. This may take a minute... If this is your first...
vico
1

votes
1

answer
262

Views

How to set an item property of one qml from main.qml

I waste my time to find how set the visible property to false, the delegate being in an another qml file. For instance here is a simple example based on Places Map. Marker.qml import QtQuick 2.0 import QtLocation 5.6 MapQuickItem { id: idPointsMarker sourceItem: Loader{sourceComponent: idRect} visib...
kontiki
1

votes
2

answer
355

Views

An efficient way to render similar objects in Qt3D?

I need to render hundreds of objects sharing their mesh and material (and having different QTransforms). The only way I found is to create an instance of QEntity for each of them. Each would be holding an instance of the mesh and of the material resulting in a huge waste of time and memory. Is there...
Alex
1

votes
1

answer
288

Views

Qt widgets do not adjust correctly after font size change

In my app a user can increase/decrease the font size by calling a css file with the new size definitions, and updating the stylesheets. However, I have issues with some widgets after the size changes. The first one is that QComboBox items are overlapping: I tried to set the height of the items but i...
Dan Tavori
1

votes
1

answer
904

Views

How to get QtWebKitWidgets.QWebView to work with qt designer

I want to integrate/show a web page (url) section on my main window. I use anaconda, pyqt (5.6) and designer. I added a QWebView on my main form via designer. But I can't run it. The error I get when I try to run the main window is: self.webView_test = QtWebKitWidgets.QWebView(self.centralwidget) Na...
shafuq
1

votes
1

answer
440

Views

Compiling error of deploying app into android device using QT

I am developing an app using QT for android on Window Platform. And I encountered a problem when I clicked 'Build' button for the android project. The error message showed that ' Cannot run target compiler 'C:\Android\android-ndk-r16b-windows-x86_64\android-ndk-r16b/toolchains/arm-linux-androideabi-...
md612
1

votes
0

answer
346

Views

I can't write or read stdin or stdout of a QProcess from a Qt application

I'm using the Qt framework to make a GUI window, and what I do is open another application by creating a QProcess. I want to communicate with this second process, and the documentation says I can do this by writing to the process's stdin or reading from the process's stdout. I've tried many combinat...
Zebrafish
1

votes
1

answer
144

Views

OpenCV & Qt - SetGeometry-Error

I looked through the following links but could not find a solution to my problem: Qt setGeometry: Unable to set geometry Unable to set geometry in Qt https://forum.qt.io/topic/38304/setgeometry-unable-to-set-geometry The following code produces a the error. While debugging with Visual Studio the ima...
NewTech
1

votes
0

answer
139

Views

How to do swipe action in QT for android

I am trying to create an image viewer app with slide show. When the user clicks on the play button, the viewer starts to show images with slide show in another window. When the the user clicks on the stop button, the viewer stops to show images. This part is successfully done. But the remaining part...
md612
1

votes
1

answer
306

Views

How to take webpage screenshots using QWebEngineView without opening window

I'm looking for a way to take website screenshots with QWebEngineView. The main goal is to develop a headless screencapture application that runs in the background. I've managed to get a minimal working example to work (see this for example). However, these examples require that the QWebEngineView...
RAM
1

votes
1

answer
371

Views

How do I set tick label explicitly from QChart?

I have to create a chart and use QChart. So I looked at the QChart dynamic spline example (because I'm going to create a dynamic chart), and I found something strange there. Below is the launch screen. The code is the example code provided by Qt, except for setTickCount(). launch screen image: dynam...
minjee
1

votes
1

answer
430

Views

LLDB - Qt missing debug info

I've installed Qt 5.10.0 through the macOS installer. I'm currently running OSX El Capitan 10.11.6. Whenever I try to load any of the Qt libraries/ frameworks, I get the following warning: warning: (x86_64) /Users/randomuser/Qt/5.10.0/clang_64/lib/QtWidgets.framework/QtWidgets empty dSYM file detect...
vejmartin
1

votes
0

answer
207

Views

Change font sizes of a QFileDialog in QT

I am developing an app on android platform using QT. When I am using the FileDialog of the app to open a file on the mobile phone, I find the font size is too small for my finger to select a folder. How can I make the font size larger? I tried the following code, but the font size doesn't change. th...
md612
1

votes
0

answer
90

Views

Why does QWindow not resize at half screen width?

#include 'editor.cpp' int main(int argc, char *argv[]) { QApplication app(argc, argv); QDesktopWidget *screen = QApplication::desktop(); int height = screen->height(); int width = screen->width(); textEditor window; window.resize(width, height); window.show(); window.resize(width/2, height); wi...
Vinayak Singla
1

votes
1

answer
247

Views

Qt Creator does not show locals while debugging with gdb on Windows

I've recently run into the issue of not being able to use the debug view of Qt Creator. No Local Variables would show up and Expression Evaluators only work to some extent. I've created this tiny C program to demonstrate the issue, though it happened in a standard Qt App as well. #include int main(...
Binary
1

votes
0

answer
39

Views

How can I combine a Qscrollbar with the Qfiledialog?

I encountered a problem when I am developing an app on android platform using QT. I enlarged the fontsize of Qfiledialog component, but the mobile screen is too small to show all parts of QFiledialog. I need a Qscrollbar to adjust a position and select a folder. How can I combine a qscrollbar with t...
md612
1

votes
1

answer
311

Views

QMAKE: Link static library against another static library

I have a QMAKE staticlib project (libtest.a) that deppends to ther subproject (liblogger.a) I try to add his to test.pro: LIBS += -L$$OUT_PWD/../libs/logger/ -llogger PRE_TARGETDEPS += $$OUT_PWD/../libs/logger/liblogger.a but, finaly, qmake pack .a library without liblogger.a ar cqs libtest.a libtes...
M.A. Pons
1

votes
0

answer
470

Views

Qt calling python using QProcess

I'm trying to launch a python script from a QT project using QProcess and It appears I keep getting an error saying Error: Debugging starts Python error: 'ImportError: No module named site\r\n' Python result= '' Debugging has finished However I've broken this down to such a simple project. I am...
JokerMartini
1

votes
0

answer
27

Views

Qt cached table example changes all rows to first value on submit

I'm trying to implement the QT cached table example in my code. However, when i try to change the value of a single attribute in a particular record and click submit, the entire set of records is updated with that same value (duplicates). I have a total of 32 records which get updated upon clicking...
Agresh Gupta
1

votes
0

answer
191

Views

Qt/QML : XmlListModel not able to read the xml file

I am not able to read a simple xml file using XMLListModel. The below error is shown all times in console. Error FODC0002 in tag:trolltech.com,2007:QtXmlPatterns:QIODeviceVariable:src, at line 1, column 38: Unsupported XML version. XML File: A blog post Sat, 07 Sep 2010 10:00:01 GMT Another blog po...
Prasoon
1

votes
0

answer
263

Views

QScrollarea Stylesheet with QWidget

I have a problem with the inheritance system of the parent-child Css while I tried all possibilities with the Id Selector in the Css. the QScrollarea contains a QWidget type model with the following hierarchy: Qt hierarchy class I do not understand even though I change the QWidget (modelWidget) to Q...
Qt first
1

votes
1

answer
206

Views

Qt's FileDialog defaultSuffix not functionning

I'm using the following code to the new property of the filedialog under QtQuick.Dialogs 1.3 & Qt 5.10.0. I've build it using Qt Creator 5.10 default kit. import QtQuick 2.10 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.3 Window { visible: true width: 640 height: 480 title: qsTr('Hello World')...
AlexandreBorowczyk
1

votes
0

answer
442

Views

Integrating a PyQt3D window into a QMainWindow

We can use QWidget.createWindowContainer to add a 3D view into a QMainWindow (a window with menus, status bar, etc). However, I found that this approach does not work, the windows opens up but fails to render the 3D contents. It also displays the error QOpenGLContext::swapBuffers() called with non-e...
Overdrivr
1

votes
0

answer
97

Views

Qml: overwritten var type property from c++ side gets invalidated

While playing around with accessing qml properties from c++ side I stumbled upon weird behavior. If property type is var and I overwrite property value with different type it gets invalidated when destructor is called. When one overwrites qml objects property value to i.e. QVariant(QString()) value...
Eligijus Pupeikis
1

votes
0

answer
35

Views

Struggling to pass a string from JavaScript to C++ in qtQuick

Ive been trying to pass a simple string from JavaScript for several hours now. I've tried everything i can think of and more. I dont know how to use c++ at all but the implementation of JavaScript in QtQuick has no way to save files so i have to use it. things ive tried: defining the type of dataDum...
problemlow
1

votes
0

answer
23

Views

Passing JavaScript string to C++ in the QtQuick environment

What I've been attempting to do is to call a C++ function from javaScript, ive got that bit working, i can print hello world to the console this way, however when i try to pass a string to the function to save it to file it only saves a blank line to the file. There are no errors printed to the cons...
problemlow

View additional questions