Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • MySql plugin for windows

    14
    0 Votes
    14 Posts
    13k Views
    D
    Thank you for you answers. I guess, I have to install qt and mysql on the same disk and see, what will happen. Because in command prompt for some reason I can't change the disk letter. May be only problem was in a drive letter. I'm not sure. In linux it wasn't that hard.
  • Qt LGPL and EPL compatibility

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Zooming detail and resolution on QGraphicsView

    4
    0 Votes
    4 Posts
    5k Views
    S
    Are they images your loading from disk or ones you're creating in code? If they're from disk then you can use a tool like Inkscape to generate them, but if you're doing it from code I wouldn't know where to start! Just changing the format won't quite do it all, you will still have to redraw the vector image to the new scale, but that should just be a simple QImage call. I don't think just zooming in the graphics view will be enough as it will probably just scale the pre-drawn image.
  • Inheritance of plugins with QPluginLoader not working?

    3
    0 Votes
    3 Posts
    4k Views
    T
    Thanks Lukas, I understand the problem. The source of it was in the full project. In there I had the following @ class SurfaceMeshIO : public ModelIO{ Q_INTERFACES(ModelIO) ... @ @ // Source of error class io_surfacemesh_off : public QObject, public SurfaceMeshIO{ Q_OBJECT Q_INTERFACES(SurfaceMeshIO) .... @ I was assuming that since "io_surfacemesh_off" inherited from SurfaceMeshIO, the Q_INTERFACE(ModelIO) was already taken care of from its superclass. I have to admit, it's kind of weird that I have to do what follows: @ // Correction class io_surfacemesh_off : public QObject, public SurfaceMeshIO{ Q_OBJECT Q_INTERFACES(SurfaceMeshIO) Q_INTERFACES(ModelIO) .... @
  • Include OpenCV in qtCreator

    19
    0 Votes
    19 Posts
    27k Views
    K
    It is good to know that you could finally solve the problem. Please mark the subject line with [Solved] .
  • Problem in deleting QTabWidget's Widget...

    3
    0 Votes
    3 Posts
    4k Views
    M
    Thanks Vass ..its working fine.... Thanks for your Valuable inputs..
  • 0 Votes
    15 Posts
    15k Views
    G
    from/toStdString always converts the text. If you want to be safe, you MUST know, which char* convention you use. Codepage based? Utf-8? I personally prefer utf-8, which is simple with QString: @ QByteArray ba = string.toUtf8(); @ The byte array has the correct length and a const char* conversion so you can put it to an std::string.
  • How to find the collidal coordinates

    2
    0 Votes
    2 Posts
    2k Views
    F
    Maybe this helps "intersection":http://doc.qt.nokia.com/stable/qrect.html#intersected
  • [Moved] qt creator build a dll

    6
    0 Votes
    6 Posts
    4k Views
    W
    @ C# code using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace ConsoleApplication1 { public static class Test { [DllImport("qtcpdll.dll", EntryPoint="start", CallingConvention=CallingConvention.Cdecl)] public extern static int start(); } } /////////////////////////////////////////// using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int res = Test.start(); Console.WriteLine(res); Console.Read(); } } } /////////////////////////////////////////// QT CODE tcpserver #ifndef SERVER_H #define SERVER_H #include <QObject> #include <QTcpServer> #include <QTcpSocket> class server : public QObject { Q_OBJECT public: explicit server(QObject *parent = 0); QTcpServer *tserver; QTcpSocket *socket; public slots: void newConnect(); void receiveMSG(); }; #endif // SERVER_H //server.cpp #include "server.h" server::server(QObject *parent) : QObject(parent) { tserver = new QTcpServer; if(tserver->listen(QHostAddress::Any, 9999)) qWarning("listing on 9999"); connect(tserver, SIGNAL(newConnection()), this, SLOT(newConnect())); } void server::newConnect() { socket = tserver->nextPendingConnection(); connect(socket, SIGNAL(readyRead()), this, SLOT(receiveMSG())); } void server::receiveMSG() { QByteArray data; data.resize(socket->bytesAvailable()); socket->read(data.data(), data.size()); qWarning("receive# %s", data.data()); } @ Thread running normally now. I was in the project which added a "tcpserver", used to monitor the connection and receive messages. In C # to call when the client "socket" shows the state is "already connected", but in C # where not receive data, "incomingConnection" function has not been called. If I use QT to use the DLL functions can be done, then, C # in the die. Is no event loop ah?
  • [SOLVED]problem with setCentralWidget

    5
    0 Votes
    5 Posts
    10k Views
    L
    Well, I took a quick look at the sources and in fact the central widget is only deleted if the new central widget is actually different from the current central widget. This means the subsequent calls to setCentralWidget() using the same widget will work. So the problem only arises if you pass another central widget before passing the current central widget again (as in your case).
  • [SOLVED]suggestion for actions default behavior when uncheked

    3
    0 Votes
    3 Posts
    2k Views
    F
    I was looking for a simpler out-of-the-box way, but since it is not so hard to coding this one, I will take it! Thanks.
  • How to know the timezone using Qt classes.

    3
    0 Votes
    3 Posts
    2k Views
    L
    You might take a look at "QTBUG-71":https://bugreports.qt.nokia.com/browse/QTBUG-71.
  • Converting void pointer to qstring

    14
    0 Votes
    14 Posts
    10k Views
    G
    We have no idea which program sends you messages and how to interpret them. Contact the one who wrote it.
  • Activated signal in QTreeView

    3
    0 Votes
    3 Posts
    7k Views
    A
    It don't work on windows platform if double-clicking on item. I know that this is not the same as "selected", but with selected (click signal) it works, I mean it enters my slot, but if I use activated signal it never get there (even when I enter item, change value and press "Enter" key). So I need to know when the signal activated is emitted in my case? Maybe it don't work because I use item delegate ?
  • How to know if a file is a text file or a binary file?

    11
    0 Votes
    11 Posts
    12k Views
    F
    sorry soroush !!! since my keywords used for searching this particular topic didn't find me any solution and I didn't done much research on it. Since QT guys always repsonded me quickly!!! :) yes, I thought of making it as separate question. But, got more interested in finding solution(New to C++ and QT) .!!
  • Using OpenCV in Qt

    2
    0 Votes
    2 Posts
    5k Views
    M
    did you try google? "qt-opencv-combined-for-face-detecting-qwidgets":http://www.morethantechnical.com/2009/03/05/qt-opencv-combined-for-face-detecting-qwidgets/
  • [SOLVED]what signal to capture in order to sync filename

    2
    0 Votes
    2 Posts
    2k Views
    V
    May be this signal can help you @void QFileSystemModel::fileRenamed ( const QString & path, const QString & oldName, const QString & newName ) [signal] @ bq. This signal is emitted whenever a file with the oldName is successfully renamed to newName. The file is located in in the directory path.
  • File errors in Ubuntu

    8
    0 Votes
    8 Posts
    4k Views
    M
    Ahhhh....many thanks, the flushing/closing did the trick, many thanks fluca.
  • Generateds the mysql drivers

    3
    0 Votes
    3 Posts
    2k Views
    P
    yes,you are right, but first thing is how I can find that directory? and go to there by using cd>
  • Qtextstream and Qfile

    4
    0 Votes
    4 Posts
    6k Views
    K
    Well, as I wrote seeing all text in one line does not necessarily mean that there is no newline in windows. Do you have a lister allowing to see it as hex? You may also try to write '\r' and '\n' at the line end. [Edit] Just saw this in the doc: [quote]Note: On Windows, all '\n' characters are written as '\r\n' if QTextStream's device or string is opened using the QIODevice::Text flag. [/quote] So if you write on windows the translation is enforced in Qt. Do you open the file as a text file as recommended?