Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Sanity tests and Bots

    5
    0 Votes
    5 Posts
    3k Views
    L
    Hi, I have still a question concerning QT tests and WebKit test. Is there any domcumentaiton that is listed what tests are done and what features are tested. I have looked at : WebKit/QtWebKit-2.2.0/Tools/TestWebKitAPI/Tests/WebKit2 but i really don't undertand what the tests are supposed to do. thanks
  • [SOLVED] anchoring items in QWidget as you do with QML

    4
    0 Votes
    4 Posts
    2k Views
    S
    thank you. I will use Qt Animation Framework!
  • [SOLVED] cannot catch a signal

    4
    0 Votes
    4 Posts
    2k Views
    N
    I think you have to keep a reference to the new ProgramSettings() that you use to make the connections. You should have : @ #ifndef MAINWINDOWS_H #define MAINWINDOWS_H #include <QObject> #include <QWidget> #include <QPushButton> class MainWindows : public QWidget { Q_OBJECT public: explicit MainWindows(QWidget *parent = 0); private: QPushButton *ingrandimento; QPushButton *rimpicciolimento; ProgramSettings *programSettings; signals: private slots: void updateAll(int newIngrandimento); }; #endif // MAINWINDOWS_H @ @ include "mainwindows.h" #include "guida.h" #include "programsettings.h" #include <QVBoxLayout> #include <QDebug> MainWindows::MainWindows(QWidget *parent) : QWidget(parent) { this->setWindowFlags(Qt::FramelessWindowHint); QVBoxLayout *left = new QVBoxLayout(this); ingrandimento = new QPushButton("Non vedo!!!"); QFont font("Calibri", 26); font.setBold(true); ingrandimento->setFont(font); rimpicciolimento = new QPushButton("Porto gli\nocchiali,\nma ci\nvedo\nancora!!"); QFont font1("Calibri", 24); font1.setBold(true); rimpicciolimento->setFont(font1); left->addWidget(ingrandimento); left->addWidget(rimpicciolimento); programSettings = new ProgramSettings; QObject::connect(ingrandimento, SIGNAL(clicked()),programSettings , SLOT(addIngrandimento())); QObject::connect(rimpicciolimento, SIGNAL(clicked()), programSettings, SLOT(reduceIngrandimento())); QObject::connect(programSettings, SIGNAL(ingrandimentoChanged(int)), this, SLOT(updateAll(int))); } void MainWindows::updateAll(int newIngrandimento) { qDebug("updateAll"); ingrandimento->resize(newIngrandimento * 100 + 100, 100 * newIngrandimento + 100); rimpicciolimento->resize(newIngrandimento * 100 + 100, 100 * newIngrandimento + 100); qDebug()<<"newIngrandimento: " + newIngrandimento; } @
  • Unable to see images after deploymenmt .

    15
    0 Votes
    15 Posts
    4k Views
    K
    When your testing your application on your development PC the plugins are present (because you have you Qt SDK). When you deploy your application at a customer PC they probably won't have the Qt SDK installed so you need to provide all the dlls your application requires (e.g. QtGui.dll, QtCore.dll.. AND the image plugins). The image plugins need to be present in the following way: YourProgramsInstallationFolder/plugins/imageformats/qjpeg.dll .....
  • QODBC with MS SQL

    3
    0 Votes
    3 Posts
    3k Views
    C
    Thanks! I acctually figured it out by adding the username and password into db.open() so it was db.open("username", "password") I thought that using the 2 statements above that line would have taken care of that but apparently not.
  • Qextserialport library issue

    2
    0 Votes
    2 Posts
    1k Views
    K
    You need to include QextSerialPort already in comport.h .
  • 0 Votes
    5 Posts
    2k Views
    ?
    Okay, I now use prefixes and it works perfect. Thank you for your help. Solved.
  • MacOS X Escape key handling - How?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • How to send files from server to client

    13
    0 Votes
    13 Posts
    9k Views
    S
    The QtWebApp contains a very simple HTTP server which might be what you are searching for: http://stefanfrings.de/qtwebapp/index-en.html
  • 0 Votes
    4 Posts
    3k Views
    U
    [quote author="sierdzio" date="1342969372"]All of those are equally supported on desktop OSes, Android and (not sure 100% here) iOS. [/quote] That is simply not true, the last two we all know aren't really "supported" and the community ports are incomplete, laden with broken or missing features. On the subject of which is more portable - If a platform supports native C++ Qt, it is likely to also support QML, which is merely an API written in C++. That being said, with QtQuick2 there is a requirement for OpenGL and plenty of stuff is done in hardware, which might be a portability issue, whereas in C++ you can stick to doing everything in software, which is the case of QtQuick1 as well. Both the Android NDK and the apple SDK support native C++, so even if Qt is not supported you can still write the core of your app in C++ and just do different frontends in the target device native framework. Best case scenario for portability is you write your application and that's all, no extra efforts are needed to run it on different platforms, but for Qt this applies only to desktop platforms, and not always 100%. If your application is simple you might have better chances going for the HTML/JS combo, which is more portable.
  • QTextEdit with Enter in searching

    7
    0 Votes
    7 Posts
    3k Views
    R
    PyQt is not a part of the Qt Project anymore. The following is how it is done in PySide(Its official alternative). The syntax and usage may vary, but the essential idea is the same in both. You can get more info on PyQt syntax "somwhere in here":http://www.riverbankcomputing.com/static/Docs/PyQt4/html/classes.html or "here":http://www.riverbankcomputing.com/static/Docs/PyQt4/html/index.html @ #code here self.myTextEdit.textChanged.connect(slotForQuery) #other code here def slotForQuery(self) : textToQuery = self.myTextEdit.text() #rest of the query code here #code here @ i don't know anything about database handling, so can't say anything about that... But for performing something when the text changes in the text edit, this mechanism should work P.S. you should consider using a QLineEdit instead of QTextEdit if you have to enter only one or two numbers in it(the code above works for it too)
  • Can I do this?

    8
    0 Votes
    8 Posts
    3k Views
    W
    @Zlatomir AFAIK operator< is needed for std::set and QSet, because at least in std::set elements are are stored in an orderly. And search inside std::set and in QSet is actually a binary search, at least in GCC implementation of std::set RB-tree is used. This approach may be a little bit slower but is easy to implement.
  • Embed Xnest in QX11EmbedContainer

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • How to swap the value from two lineEdit fields

    7
    0 Votes
    7 Posts
    2k Views
    F
    Thanks a lot for the code.
  • Make a left/right arrow QShortcut

    3
    0 Votes
    3 Posts
    3k Views
    A
    Thanks! Solved!
  • Issues with QSettings::value()::toInt()

    5
    0 Votes
    5 Posts
    2k Views
    S
    Oh. Excuse me. Nothing, becouse i should have written QString::setNum(I). In fact it is right! :)
  • Qt and v8 javascript engine

    4
    0 Votes
    4 Posts
    3k Views
    A
    OH .. I am very sorry !! This is the only line that i didn't read !
  • KDChart : add Horizontal line

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Subtle difference in the use of QDebug for your own class

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Mainwindow forms !!!

    2
    0 Votes
    2 Posts
    1k Views
    sierdzioS
    I think you would have to subclass & write your own painting methods to make it work.