Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • How to validate special characters in QString

    9
    0 Votes
    9 Posts
    13k Views
    I
    Hi How to give multiple filter conditions in one regular expression. Like i wat to filter special characters & alphabets.
  • 0 Votes
    3 Posts
    3k Views
    G
    They're both quite the same. #include <QGroupBox> resp. #include <QtGui/QGroupBox> is the recommended variant and more "C++ style".
  • Need help inserting something in Qt tree view with python

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • QProgressBar chunk

    5
    0 Votes
    5 Posts
    5k Views
    V
    I'll double it as not possible, I believe. You could add your own signal handler to change the progress bar style sheet when it is completed with a regular call to setStyleSheet.
  • [SOLVED]setting QTcpSocket TCP_NODELAY option

    5
    0 Votes
    5 Posts
    9k Views
    S
    Thanks. Solved.
  • 0 Votes
    8 Posts
    7k Views
    G
    You can try to use an "eventFilter":http://doc.qt.nokia.com/4.7/qobject.html#eventFilter
  • What may be the error in the following function?

    8
    0 Votes
    8 Posts
    3k Views
    G
    You're always displaying the tool tip on entering the widgets area, regardless whether the mouse cursor is in the hot spot or not. So check for the correct position before displaying the tool tip at all.
  • Problem with QIcon::fromTheme()

    4
    0 Votes
    4 Posts
    5k Views
    G
    Ah, sorry, I misread the first post. The default icon must be provided as a ready-to-use icon. So, if you do not provide the resource file on Linux, the icon cannot be created - hence the error message. So you would either need to #ifdef the code and leave out the default for Linux or add your default set of icons to the resource file on Linux too. I would go for the latter, as I would not bet that in any and every case you'll have system icons on Linux too, so providing your default set is a good idea. The additional size is negligible, in my opinion.
  • OpenGL without QGLWidget?

    5
    0 Votes
    5 Posts
    6k Views
    M
    What exactly is your motivation not to use QGLWidget? Portability? I assume you're using Qt's other services anyway (loading textures etc) so what's the harm in using QGLWidget? For reference, I wrote an OpenGL app that uses only portable standard OpenGL (none of those classes provided by Qt such as QGLShaderProgram) and QGLWidget just to provide the OpenGL context. I put 90% of my code in portable C++ and use a following class setup: @class MyPortableOpenGlStuff { .. } class MyGLWidget : public QGLWidget, public MyPortableOpenGlStuff { .. }@ To port the software, only stuff such as the context + image loading would have to be rewritten. And since most of the platforms run Qt code (damn you Apple, thank you Necessitas) nicely, I havent even had to port anything yet.. Matti
  • QLineEdit and QTextEdit misread OS X Keystroke events

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Forbid leaving a QLineEdit

    15
    0 Votes
    15 Posts
    12k Views
    G
    As you want to force your users through the line edits, I would go for another approach: disable every line edit but the first once the first line edit has acceptable input, enable the next line edit when the content changes to inacceptable input, disable all line edits following the current one and so on This way your users have a clear presentation of which controls are usable at a given moment. I personally would be really embarrassed by an UI that makes me widgets appear as active, which actually are not. This is against all UI design principles. Such an application is plain not acceptable from a UI point of view.
  • 0 Votes
    3 Posts
    6k Views
    G
    Two typos: it is Q_DECLARE_INTERFACE (not QT_) your class is named ActionInteface - an r is missing in Interface
  • Qt as interface to Matlab application

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • QSettings and "folders".

    13
    0 Votes
    13 Posts
    6k Views
    Z
    There were some discussions about adding support for native settings backends to QSettings or to provide additional classes in to allow access to native settings stores. You may want to discuss this on the qt-development mailing list.
  • Setting up the position of QGraphicsView

    8
    0 Votes
    8 Posts
    10k Views
    A
    Thanks a lot for your reply.... Yes, now I have modified my code and its working fine, now I can display two GraphicsView windows in the GUI. I have to work out on layouts,, I will definitely comeback if I have any queries. Thanks a ton :)
  • Line in QTextEdit

    3
    0 Votes
    3 Posts
    2k Views
    C
    You mean create multiple QTextEdit in QScrollArea for example ? If that's right, I tried but the management of the number of page when deleting rows, for example is not so easy :) Otherwise can you be more specific about your idea? In advance thank you
  • Commercial application for Windows and MAC OSX

    3
    0 Votes
    3 Posts
    2k Views
    L
    You have to pay at least to the I-have-spelled-Qt-wrong jar. Twice.
  • Phonon with vlc backend on Windows

    4
    0 Votes
    4 Posts
    8k Views
    F
    If you still need a solution, download "the phonon vlc dlls":http://people.videolan.org/~jb/phonon/phonon-vlc-4.5-0.4.1-sdk.7z. It's built with mingw, so if your application is building in Visual Studio it won't work for you. Extract the bin folder to your application folder and remove the ds9 dll in the phonon_backend folder. According to jb (the guy who built it), it is that simple. Hope this helps!
  • Does Winid function of Qwidget class will work in different platform?

    2
    0 Votes
    2 Posts
    2k Views
    L
    It is available on all supported platforms but the type of the id differs. See the "documentation":http://doc.qt.nokia.com/stable/qwidget.html#winId. [quote]Portable in principle, but if you use it you are probably about to do something non-portable. Be careful.[/quote]
  • [SOLVED] QRegExp exept capture group

    4
    0 Votes
    4 Posts
    3k Views
    M
    tnx a lot! Don't read to that paragraph, i remember so need write some symbol, but what exactly - can't remember. :(