Search Results

Search found 2964 results on 119 pages for 'qt stylesheet'.

Page 28/119 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • Qwt plot not working , simple plot curve not appeat

    - by user1629213
    I followed the example of simple plot in qwt examples to plot a curve. The axis and the graph appear in the Qt main window user interface but the curve not. I assigned values to fit the curve but the curve not appear. Any suggestions and help how to solve the problem? Here is my code MainWindow::MainWindow( int argc, char** argv, QWidget *parent ) : QMainWindow( parent ) , qnode( argc,argv ) { ui.setupUi( this ); // Calling this incidentally connects all ui's triggers to on_...() callbacks in this class. QObject::connect( ui.actionAbout_Qt, SIGNAL( triggered( bool )), qApp, SLOT( aboutQt( ))); // qApp is a global variable for the application ReadSettings( ); setWindowIcon( QIcon( ":/images/icon.png" )); ui.tab_manager->setCurrentIndex( 0 ); // ensure the first tab is showing - qt-designer should have this already hardwired, but often loses it (settings?). QObject::connect( &qnode, SIGNAL( rosShutdown( )), this, SLOT( close( ))); /********************* ** Logging **********************/ ui.view_logging->setModel( qnode.loggingModel( )); QObject::connect( &qnode, SIGNAL( loggingUpdated( )), this, SLOT( updateLoggingView( ))); QObject::connect( &qnode, SIGNAL( graphReceived( )), this, SLOT( onGraphReceived( ))); QObject::connect( &qnode, SIGNAL( parameterReceived( )), this, SLOT( onParameterReceived( ))); /********************* ** Auto Start **********************/ if ( ui.checkbox_remember_settings->isChecked( )) { on_button_connect_clicked( true ); } ui.parameters->setAttribute( Qt::WA_NoMousePropagation ); ui.parameters->setAttribute( Qt::WA_OpaquePaintEvent ); ui.plotgraph->setAttribute( Qt::WA_NoMousePropagation ); ui.plotgraph->setAttribute( Qt::WA_OpaquePaintEvent ); p_plot = new QwtPlot(ui.plotgraph); p_plot->setTitle( "Plot LinVel" ); p_plot->setCanvasBackground( Qt::white ); // Axis p_plot->setAxisTitle( QwtPlot::xBottom, "Time(sec)" ); p_plot->setAxisTitle( QwtPlot::yLeft, "Linear Velocity (m/sec)" ); p_plot->setAxisScale( QwtPlot::yLeft, 0.0, 10.0 ); p_plot->setAxisScale( QwtPlot::xBottom, 0.0, 50.0 ); p_plot->insertLegend( new QwtLegend() ); //samplingThread.start(); QwtPlotGrid *grid = new QwtPlotGrid(); grid->attach( p_plot ); curve = new QwtPlotCurve(); curve->setTitle( "Linear velocity" ); // Set curve styles curve->setPen( Qt::blue, 4 ), curve->setRenderHint( QwtPlotItem::RenderAntialiased, true ); QwtSymbol *symbol = new QwtSymbol( QwtSymbol::Ellipse, QBrush( Qt::yellow), QPen( Qt::red, 2 ), QSize( 8, 8 ) ); curve->setSymbol( symbol); // Assign values to the curve //curve->setSamples(ui.plotgraph.get_linv_g());//yaw_g,trav_g,wall_g; curve->attach( p_plot ); p_plot->resize( 600, 400 ); p_plot->show(); void MainWindow::onGraphReceived( ) { { QMutexLocker locker( &qnode.m_mutex ); } } void MainWindow::onParameterReceived( ) { { QMutexLocker locker( &qnode.m_mutex ); std::vector<double> p_ = qnode.get_parameters(); std::cout << p_[0]<<" "<<p_[1]<<" "<<p_[2]<<" "<<p_[3]<<" "<<p_[4] << std::endl; } } Any help?

    Read the article

  • TypeError: Cannot call method 'hasOwnProperty' of null, while creating a QMLscene window

    - by tomoqv
    I am trying to make a simple Ubuntu Touch web application with Qt Creator. I have set up a new project according to the tutorial and committed the files to Bazaar. I have set a url instead of the default index.htm in the qml file of the project. Using build-run loads a QML Scene window with the desired webpage, but Qt Creator yields the following output: Starting /usr/lib/i386-linux-gnu/qt5/bin/qmlscene -I /home/tomas/ubuntu-sdk/SL-planner -I /usr/bin -I /usr/lib/i386-linux-gnu/qt5/qml /home/tomas/ubuntu-sdk/SL-planner/SL-planner.qml unity::action::ActionManager::ActionManager(QObject*): Could not determine application identifier. HUD will not work properly. Provide your application identifier in $APP_ID environment variable. file:///usr/lib/i386-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:257: TypeError: Cannot call method 'hasOwnProperty' of null My SL-planner.qml looks like this: import QtQuick 2.0 import Ubuntu.Components 0.1 import QtWebKit 3.0 /*! \brief MainView with a Flickable WebView. */ MainView { // objectName for functional testing purposes (autopilot-qt5) objectName: "mainView" // Note! applicationName needs to match the "name" field of the click manifest applicationName: "com.ubuntu.developer.tomoqv.SL-planner" /* This property enables the application to change orientation when the device is rotated. The default is false. */ automaticOrientation: true width: units.gu(100) height: units.gu(75) Flickable { id: webViewFlickable anchors.fill: parent WebView { id: webView anchors.fill: parent url: "http://mobil.sl.se" } } } What am I missing?

    Read the article

  • Compiling C++ code with mingw under 12.04

    - by golemit
    I tried to setting up compiling of the C++ projects under my Ubuntu 12.04 by mingw with QT libraries. The idea was to get executable independent from variations of target Windows versions and development environments of my colleagues. It was successfully implemented under OpenSuse 12.2 with mingw32 and some additional libraries including mingw32-libqt4 and some others. Fine. However when trying to do the same under Ubuntu 12.04 with mingw-w64 including latest libraries QT-4.8.3 copied from Windows there were always errors. No luck. The typical errors in these attempts can be seen in attachments. The commands used: qmake -spec /path_to_my_conf/win32-x-g++ my_project.pro make Can someone give a hint of the problem source? I would appreciate a good advice. Serge some exctracts from LOG: ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0xec): undefined reference to `QDialog::accept()' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0xf0): undefined reference to `QDialog::reject()' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x104): undefined reference to `non-virtual thunk to QWidget::devType() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x108): undefined reference to `non-virtual thunk to QWidget::paintEngine() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x10c): undefined reference to `non-virtual thunk to QWidget::getDC() const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x110): undefined reference to `non-virtual thunk to QWidget::releaseDC(HDC__*) const' ./.obj/moc_xlseditor.o:moc_xlseditor.cpp:(.rdata$_ZTV10GXlsEditor[vtable for GXlsEditor]+0x114): undefined reference to `non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const' ./.obj/qrc_images.o:qrc_images.cpp:(.text+0x24): undefined reference to `__imp___Z21qRegisterResourceDataiPKhS0_S0_' ./.obj/qrc_images.o:qrc_images.cpp:(.text+0x64): undefined reference to `__imp___Z23qUnregisterResourceDataiPKhS0_S0_' collect2: ld returned 1 exit status

    Read the article

  • Installing qt headers and libraries

    - by ant2009
    Hello, Ubuntu 9.10 2.6.31-20-generic I am trying to install some software. When I do the ./configure. I get the following error: checking for Qt... configure: error: Qt (>= Qt 3.0.2) (headers and libraries) not found. Please check your installation! So I install the following package thinking this would solve the problem. sudo apt-get install libqt4-dev I was thinking that the libqt4-dev would install the headers and libraries. However, I am still getting the same problem. Any ideas? Many thanks,

    Read the article

  • Updates to Wordpress theme template/stylesheet are not reflected when a file is edited

    - by Bryan
    I am developing a theme in Wordpress. I have an issue where updates to my stylesheet (style.css) are not being reflected in the browser after FTPing a new version of the file to the server. Edits will only show up in the browser after waiting a long time, (15+ minutes). I have tried all the things mentioned here, which have not worked. These include: Making sure no caching plugins are installed in Wordpress Clearing the browser cache Trying from a different browser Making sure I am editing and accessing the correct file Checking webhost configuration panel for a caching plugin Something seems to be caching the stylesheet but I'm not sure how this might be so.

    Read the article

  • Sortie de Qt 5 Beta 2, la liste des modules disponibles avec la version finale est décidée

    Sortie de Qt 5 alpha La première version majeure du Qt Project autonome se concentre sur les performances et les capacités graphiques La version 5 de Qt vient de sortir en version alpha. Cette version est la première version majeure depuis que Qt est devenu autonome avec la création du Qt Project. Beaucoup de personnes ont contribué à cette nouvelle version, pas uniquement des développeurs de chez Nokia. Les différents modules ont été regroupés en deux catégories, les essentiels, installés par défaut, et les add-ons, installés à la demande. L'objectif de cette version alpha est de récupérer les retours des utilisateurs, principalement sur les modules essentiels. Lars Knoll, le responsable...

    Read the article

  • How can I make a Qt widget ignore style sheets set on parent widgets?

    - by Hisham Abboud
    When adding a QComboBox control in Qt Designer, I get a terrible looking, non-native control, see: http://curiouschap.com/wp-content/uploads/2010/05/stack_qcombobox_question.png [as a newbie, SO wouldn't let me insert the image] On digging further, it turns out that two of the parent controls, QParentWindow and QStackedWidget, have style sheets that QComboBox is inheriting. If I delete the custom styles, then I get a native QComboBox like the one on the left. How can I have QComboBox (and widgets generally) NOT inherit parent styles? Or, how can I create a style for, say, QParentWindow, and do it so that it's local only and does not cascade?

    Read the article

  • Qt SDk 4.6.2 on mac os x: invoke ffmpeg ??

    - by varunmagical
    Hello, I am writing an FFmpeg frontend in Qt & testing it on linux, windows & Mac. (FFmpeg is a popular command line tool for video operations) My project is working well on Linux & windows but I cannot invoke FFmpeg on Mac! I have compiled it from svn source on Mac & I have ensured that it is working properly by running it in Mac terminal. In my project, I have created a widget that shows FFmpeg output during conversion, but on mac, It always stays blank. Need help!

    Read the article

  • Can I get build warnings from a custom build step in Qt Creator?

    - by Derick
    I have the following script that I run as a custom build step in Qt Creator: git ls-files . | egrep "\.cpp$|\.h$" | xargs vera++ Which then gives output: foo/bar.cpp:1: no copyright notice found Another script I also use is: cppcheck . --template gcc -q --enable=style,unusedFunctions With the output: apple.h:8: style: The class 'MyPie' has no constructor. Member variables not initialized. I would love to double-click on the error and go to the source in the Compile Output window. It seems that only gcc errors are detected and these custom ones are ignored even though they have the same format.

    Read the article

  • JavaScript or Qt way to update a select box value?

    - by Pirate for Profit
    So I have the following HTML and am trying to change which item is selected. <select name="coolselectbox"> <option value="default" selected="selected">---</option> <option value="something">Something</option> <option value="something-else">Something Else</option> </select> Here's what I've tried: QWebElement defaultOpt = this->page()->mainFrame()->findFirstElement("option[value=default]"); QWebelement somethingOpt = this->page()->mainFrame()->findFirstElement("option[value=something]"); defaultOpt.removeAttribute("selected"); somethingOpt.setAttribute("selected", "selected"); And then also: QWebElement selectBox = this->page()->mainFrame()->findFirstElement("select[name=coolselectbox]"); selectBox.setAttribute("value", "something-else"); However neither of these seems to get the job done. Does anyone know a Qt solution, or is there perhaps some JavaScript snippet I can run to do this?

    Read the article

  • Is there a more expressive way of executing SQL query using Qt?

    - by ShaChris23
    I currently have this code: // Construct query QString const statement = QString("drop database if exists %1") .arg(databaseName_); QSqlQuery query(db); query.exec(statement); Is there a better way to code than the above? Specifically, I dont like how I use QString for SQL statement. It'd be nice if Qt has some class so that I could do something like: // Construct query QSomeClass statement = "drop database if exists %1"; statement.setArg(1, databaseName_); // Replace all %1 in the original string. QSqlQuery query(db); query.exec(statement);

    Read the article

  • How can I enable auto-updates in a Qt cross-platform app?

    - by FX
    I love applications that are able to update themselves without any effort from the user (think: Sparkle framework for Mac). Is there any code/library I can leverage to do this in a Qt app, without having to worry about the OS details? At least for Windows/Mac/user-owned-linux-binaries. I could integrate Sparkle on the Mac version, code something for the linux case (only for a standalone, user-owned binary; I won't mess with distros packaging, if my program is ever packaged), and find someone to help me on the Windows side, but that's horribly painful. Surely I'm not the only one who wants to provide this to users?

    Read the article

  • Qt: any way to automatically generate QSharedData-based structures?

    - by Eye of Hell
    Hello. Qt has a build-in supprt for creating objects with integrated reference counting via QSharedData and QSharedDataPointer. All wordks great, but for each such object i need to write a lot of code: QSharedData-based implementation class with constructor and copy constructor, object class itsef with accessor methods for each filed. For a simple structures with 5-10 fields this requires really lot of near same code. Is it some ways to automate such classes generation? Maybe it's some generators exists that take a short description and automatically generates implementation class and object class with all accessors?

    Read the article

  • How to add a slot to my main window in Qt builder?

    - by George Edison
    I am using Qt Builder to create a simple window. I used the menu editor to add a menu. Now, I figured out how to connect one of the menu items to the close() method of the main window. My problem is how to add a slot to the main window. Here is what I have: private slots: void OnAbout(); However, I can't get this method to show up in the 'Signals and Slots Editor'. How can I get it to show up?

    Read the article

  • Can Graphical Operations be combined in Qt or any other library ?

    - by Sunny
    Hi, Here is a Scenario, A series of operations that I will call for painting, QPainter p(this); 1). p.fillRect(0,0,320,240, RED_COLOR) 2) p.drawLine(0,0,100,100, BLUE_COLOR) 3) p.fillRect(0,0,320,240, YELLOW_COLOR) Now I want that painter should not draw first FillRect Function. It should not draw line. It should only perform last operation. Is there any way to achive this optimization in Qt. Is this type of drawing/painting optimizations are supported by any library?

    Read the article

  • Qt: Is it possible to tell a widget to take all the place that it has in layout, but not more?

    - by Lukasz Lew
    I have a following Qt code: QVBoxLayout* box = new QVBoxLayout; label = new QLabel(); // will be set later dynamically box->addWidget (label); Text in label will be set later. The problem is that when label resizes, it resizes QVBoxLayout, and it resizes other neighboring widgets. I don't want to make a label or layout fixed width. Because I want them to resize with a whole window. Is it possible to tell label to take all the place that it has in layout, but not more?

    Read the article

  • QT Question - What are all these extra spaces for ? (pic provided)

    - by mea
    stack overflow wont let me post images so heres the link: http://4m0.org/images/qt.png This is my application. For this question, ignore the top part with the buttons. I have a QScrollArea Filled with many QGroupBoxes Filled with a horizontal box layout of QLabel (on the left) and QGroupBox (on the right) The right side is a vertical box layout of QPushButtons Every single element, the scrollarea, both boxes, the labels, and the buttons all have their style sheets modified so padding is 0px and margin is 0px. Why do i have all this extra space? The scroll area has space on all sides until its inner elements (the blue boxes) start. Then those boxes have space until its inner elements (the white boxes) start. Can someone tell me what is going on?

    Read the article

  • Qml and QfileSystemModel interaction problem

    - by user136432
    I'm having some problem in realizing an interaction between QML and C++ to obtain a very basic file browser that is shown within a ListView. I tried to use as model for my data the QT class QFileSystemModel, but it did't work as I expected, probably I didn't fully understand the QT class documentation about the use of this model or the example I found on the internet. Here is the code that I am using: File main.cpp #include <QModelIndex> #include <QFileSystemModel> #include <QQmlContext> #include <QApplication> #include "qtquick2applicationviewer.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); QFileSystemModel* model = new QFileSystemModel; model->setRootPath("C:/"); model->setFilter(QDir::Files | QDir::AllDirs); QtQuick2ApplicationViewer viewer; // Make QFileSystemModel* available for QML use. viewer.rootContext()->setContextProperty("myFileModel", model); viewer.setMainQmlFile(QStringLiteral("qml/ProvaQML/main.qml")); viewer.showExpanded(); return app.exec(); } File main.qml Rectangle { id: main width: 800 height: 600 ListView { id: view property string root_path: "C:/Users" x: 40 y: 20 width: parent.width - (2*x) height: parent.height - (2*y) VisualDataModel { id: myVisualModel model: myFileModel // Get the model QFileSystemModel exposed from C++ delegate { Rectangle { width: 210; height: 20; radius: 5; border.width: 2; border.color: "orange"; color: "yellow"; Text { text: fileName; x: parent.x + 10; } MouseArea { anchors.fill: parent onDoubleClicked: { myVisualModel.rootIndex = myVisualModel.modelIndex(index) } } } } } highlight: Rectangle { color: "lightsteelblue"; radius: 5 } focus: true } } The first problem with this code is that first elements that I can see within my list are my PC logical drives even if I set a specific path. Then when I first double click on drive "C:\" it shows the list of files and directories on that path, but when I double click on a directory a second time the screen flickers for one moment and then it shows again the PC logical drives. Can anyone tell me how should I use the QFileSystemModel class with a ListView QML object? Thanks in advance! Carlo

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >