qt5.2

Qt Creator no member named stackedWidget

一曲冷凌霜 提交于 2019-12-20 05:52:34
问题 I've just designed my ui in the QT-Creator and, as the main application is based on two panels, I decided to use the StackedWidget for "change the layout" without opening a new window. So, I added a QTStackedWidget named: stackedWidget (as default). The problem is in mainwindow.cpp, I added a custom SLOT that contain: ui->stackedWidget->setCurrentIndex(1); when I build this the compiler says: mainwindow.cpp:25: error: no member named 'stackedWidget' in 'Ui::MainWindow' ui->stackedWidget-

Why does my QGestureRecognizer not receive Touch Events?

送分小仙女□ 提交于 2019-12-12 11:34:19
问题 Context: I'm trying to create a fader-like widget that can have multiple instances in the same view, each of which can be controlled simultaneously by different fingers. I want to use Qt's gesture recognition system, but I also need some functionality above and beyond the standard Qt::PanGesture . To this end, I've subclassed both QGesture and QGestureRecognizer . In FooGestureRecognizer::recognize(...) , I'm currently intercepting both QMouseEvent s and QTouchEvent s (for the time being, at

Copying file(s) with drag and drop from Qt 5.2 application to file system

和自甴很熟 提交于 2019-12-10 21:54:40
问题 How do I go about generating a file drag and drop operation in a Qt 5.2 application that performs a copy (or move) in the file system (Windows, Mac, etc.)? More specifically: Generate a drag with 1+ file paths that will perform a copy/move on those files when dropped onto the system. Is there a standard mime-type I can use for this - providing file paths as mime data? 回答1: QMimeData has a functionality to add a text/uri-list . To drag/drop a file onto the system add a QUrl that starts with

Function call missing argument list to create pointer

和自甴很熟 提交于 2019-12-10 17:11:40
问题 I tried to connect my app to OpenViBE through VRPN server. My app works well until I try to add code to connect my app to VRPN server. My code looks like this: MainWindow.c code: #include "mainwindow.h" #include "ui_mainwindow.h" #include <QtUiTools/QUiLoader> #include <QFile> #include <QMessageBox> #include <QFileDialog> #include <iostream> using namespace std; #include "vrpn_Analog.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this);

Qt Creator no member named stackedWidget

痞子三分冷 提交于 2019-12-02 11:21:51
I've just designed my ui in the QT-Creator and, as the main application is based on two panels, I decided to use the StackedWidget for "change the layout" without opening a new window. So, I added a QTStackedWidget named: stackedWidget (as default). The problem is in mainwindow.cpp, I added a custom SLOT that contain: ui->stackedWidget->setCurrentIndex(1); when I build this the compiler says: mainwindow.cpp:25: error: no member named 'stackedWidget' in 'Ui::MainWindow' ui->stackedWidget->setCurrentIndex(1); ~~ ^ also in the qt-creator itself I was unable to attach a signal to the stackedWidget

QT.no service found for - “org.qt-project.qt.mediaplayer” on building static

安稳与你 提交于 2019-11-30 19:46:28
问题 Hello in order to build static QT for Windows, I followed the next article. http://qt-project.org/wiki/How-to-build-a-static-Qt-for-Windows-MinGW Using QT vesion – 5.2.0. Operating System- Windows7. The problem is that it says – no service found for – “org.qt-project.qt.mediaplayer” on building the project. I searched the net, but no solution was useful. May be I’m not using them correctly because of some lack of knowledge of QT infrustructure, but anyway If someone could give me some

In QML TableView when clicked edit a data (like excel)

早过忘川 提交于 2019-11-30 16:06:25
问题 I have some code import QtQuick 2.2 import QtQuick.Window 2.1 import QtQuick.Controls 1.2 Window { visible: true width: 538 height: 360 ToolBar { id: toolbar width: parent.width ListModel { id: delegatemenu ListElement { text: "Shiny delegate" } ListElement { text: "Scale selected" } ListElement { text: "Editable items" } } ComboBox { id: delegateChooser model: delegatemenu width: 150 anchors.left: parent.left anchors.leftMargin: 8 anchors.verticalCenter: parent.verticalCenter } } ListModel {