Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Loops [solved]

    12
    0 Votes
    12 Posts
    4k Views
    O
    Yes, Qt is an amazing toolkit, but there is no secret, before using it, you need some basic C++ knowledge. I then suggest you to refresh your memory with some C++ basics before going on :)
  • Weird compiler error while moving code from console to GUI

    13
    0 Votes
    13 Posts
    7k Views
    A
    Hm, I had to use this library in one more file and there this definition doesn't seem to solve the problem :/
  • 0 Votes
    9 Posts
    4k Views
    D
    [quote author="Iama Hummingbird" date="1315081309"]OK pepe. But does your comment mean that a QByteArray can hold data up to 2GB? I thought QByteArray can only hold up to 32K bytes since the size is based on integer.[/quote] "int" is a 32 bit signed integer on all platforms supported by Qt. Therefore, you can index (and store) up to 2^32-1 bytes inside a QByteArray. Which means up to 2GB - 1B. That's why I was asking for an use case -- allocating a single, huge chunk of 2GB is not that common. [quote] Some of the standard examples are having webpages 'readAll()' into a QByteArray through QNetworkReply. But many web pages have more data than 32K or more characters than 32K so if put into a QString, the webpage would be amputated. [/quote] See above for the 32K part. But I think that this is quite a corner case, and you won't wait to buffer 2GB in memory before attempting to read it all at once -- you will read it as soon as possible (i.e. just after readyRead is emitted). This way you can safely download files even bigger than 2GB.
  • Qt real time audio processing

    16
    0 Votes
    16 Posts
    8k Views
    A
    nobody can help me?
  • 0 Votes
    6 Posts
    4k Views
    E
    How can be updated the QTableView (in real time) while you enter some values in a database (using QLineEdit, QComboBox, QSpinBox, .... for introducing the values)? Example.: I introduce some values and when I press QPushButton the values are added to the database and QTableView adds a row with the new record in the database.
  • 0 Votes
    8 Posts
    17k Views
    L
    Ok thank you guys! :)
  • Get windows handle?

    4
    0 Votes
    4 Posts
    5k Views
    G
    No, Qt has not direct driver support, so no direct possibility in Qt to get USB events. QMainWindow is derived from QWidget, so the method "winId":http://doc.qt.nokia.com/4.7/qwidget.html#winId exists. I already used it, it exists and works. Which errors do you get if you use it?
  • QGLWidget different behavior on windows and linux

    2
    0 Votes
    2 Posts
    2k Views
    M
    Reading qt source code (qgl_x11.cpp) I guess I understand why there is the problem. The visual used to create the window is only set in qglcontext::choosecontext and since this a private data of qglcontext (d->vi), my custom QGLContext (which redefined choosecontext) as no way to setup the visual. So it use a 0 visual which is CopyFromParent. The setformat; is a bit of a trick because it let a temporary QGLContext set the visual. I guess one solution would be to call choosevisual in qglcontext::create to initialize the visual instead of doing it in choosecontext.
  • Getting an index of match using QRegExp.

    5
    0 Votes
    5 Posts
    3k Views
    P
    Thanks for all replies, that is what I needed :)
  • Qt Mousebutton is not releasing

    2
    0 Votes
    2 Posts
    1k Views
    D
    Qt does not "grab points" (nor it releases them). Something must be wrong in the code you're using for dealing with that. Can you show us some?
  • Using QtimerEvent as Idle-function in QGraphicsScene

    3
    0 Votes
    3 Posts
    3k Views
    B
    Actually its working fine... I only had a minor problem with my coordinates.Thanks anyway
  • Access the CPU fan using qt

    4
    0 Votes
    4 Posts
    1k Views
    A
    NO I'am using windows :D..and ICM_FAN is very difficult :S:S Edited: please use a polite language. -- peppe
  • Legacy process and new Qt enable process

    5
    0 Votes
    5 Posts
    3k Views
    L
    Use a domain socket, QLocalSocket resp. QLocalServer is the Qt counterpart. Or you just use QSocketNotifier and ordinary read/write methods as already suggested (example usage see "here":http://developer.qt.nokia.com/forums/viewthread/9254/).
  • Changing layout

    2
    0 Votes
    2 Posts
    2k Views
    R
    QApplication::setLayoutDirection() doesn't affect already instantiated widgets. You need to call setLayoutDirection in your main() function like this @int main(int argc, char** argv) { QApplication app(argc, argv); app.setLayoutDirection(Qt::RightToLeft); // show stuff return app.exec(); }@ However, if you want to change the layout direction after your QApplication has been execed you need to install a new QTranslator and retranslteUi() your UI. See "this email thread":http://lists.qt.nokia.com/pipermail/qt-interest/2011-May/033798.html for more information and example code.
  • Change font address

    2
    0 Votes
    2 Posts
    2k Views
    R
    You have two options: Use QWebSettings and specify the font in C# ++ Example: @QWebSettings* websettings = QWebSettings::globalSettings(); websettings->setFontFamily(QWebSettings::StandardFont, font.family());@ Don't forget to run that before instantiating the QWebView. Use HTML 5's web font feature + CSS. In the <head></head> section of your page put the following: @ <link href='http://fonts.googleapis.com/css?family=Allerta' rel='stylesheet' type='text/css' /> @ Then you can use the font in your CSS. You can of course change the font to your own, as long as you have a URL for it. I included one of Google's fonts just as an example.
  • QGLWidget doesn't display children on Mac

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [Solved] Subversion Missing from Tools Menu

    2
    0 Votes
    2 Posts
    2k Views
    B
    Nevermind. Once I placed the project in subverion, the mnu item activated.
  • 0 Votes
    5 Posts
    22k Views
    B
    You are right it is not documented indeed. Now I emit the signal for all the nodes I update. Thanks dude! Cheers!
  • Broadcast YUV as MPEG-4 over the network

    3
    0 Votes
    3 Posts
    3k Views
    M
    I always thought that VideoLAN uses ffmpeg stuff. But acording to the http://www.videolan.org/developers/x264.html its oviously the other way around ;) Sounds interesting, I'll keep reading the documentation, thank you!
  • Picking a point using OpenGl

    3
    0 Votes
    3 Posts
    3k Views
    M
    You will need to do some raycasting and detect if the vertex is near the ray.