Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • QFile read/write

    4
    0 Votes
    4 Posts
    17k Views
    L
    [quote author="Volker" date="1312841948"] As a side note: Don't use a QLabel and show for your error message. Have a look at [[Doc:QMessageBox]], especially at the static convenience methods to show a nice error box. [/quote] Or [[Doc:QErrorMessage]], while we're at it :-)
  • QGraphicView and fixed viewport

    5
    0 Votes
    5 Posts
    3k Views
    V
    Please provide some code showing what you are doing.
  • [Split] How to scale an image proportionally

    2
    0 Votes
    2 Posts
    2k Views
    T
    Take a look at "QImage::scaled()":http://doc.trolltech.com/4.7-snapshot/qimage.html#scaled with Qt::KeepAspectRatio mode
  • Playing a Video file(.wmv) in the entire dialog window

    2
    0 Votes
    2 Posts
    2k Views
    EddyE
    You didn't use a layout in your dialog. By default a widget will be placed at the top right then.
  • 0 Votes
    6 Posts
    4k Views
    G
    That's the way, check the type URL and the check the file type. You could also use a QImage or similar and try loading it :-)
  • Passing Paramater from .cpp file to .qml file

    2
    0 Votes
    2 Posts
    1k Views
    S
    May be "this":http://xizhizhu.blogspot.com/2010/10/hybrid-application-using-qml-and-qt-c.html help.
  • Qmake flags

    5
    0 Votes
    5 Posts
    5k Views
    M
    Thanks now I get a dlerror. Are my includes wrong or how to use the lib without linking? (the lib is GPL so I cannot directly link) Many thanks Michael unix:!macx { INCLUDEPATH += ./ ... QMAKE_LFLAGS += -g -Wl,-rpath,\$$ORIGIN }
  • [solved]resizing vertical header

    15
    0 Votes
    15 Posts
    22k Views
    EddyE
    @Alexis good one!
  • Is there any way to add more Qt::globalColor ?

    3
    0 Votes
    3 Posts
    2k Views
    V
    Not possible without changing Qt source. Anyway, you probably will never need to do that. This might be overkill... ;-) Regards,
  • [SOLVED] display an image in textEdit

    12
    0 Votes
    12 Posts
    11k Views
    K
    thank you alexisdm. I fixed the code in my previous post
  • [SOLVED] Have text in QLineEdit selected on edit start

    3
    0 Votes
    3 Posts
    10k Views
    G
    The text is selected in the focusInEvent, but immediately gets deselected by the following mousePressEvent hat is delivered to the line edit. This code works for me: @ class wvQlineEdit : public QLineEdit { Q_OBJECT public: wvQlineEdit(QWidget *parent); virtual ~wvQlineEdit() {} protected: void focusInEvent(QFocusEvent *e); void mousePressEvent(QMouseEvent *me); bool _selectOnMousePress; }; wvQlineEdit::wvQlineEdit(QWidget *parent) : QLineEdit(parent) { _selectOnMousePress = false; } void wvQlineEdit::focusInEvent(QFocusEvent *e) { QLineEdit::focusInEvent(e); selectAll(); _selectOnMousePress = true; } void wvQlineEdit::mousePressEvent(QMouseEvent *me) { QLineEdit::mousePressEvent(me); if(_selectOnMousePress) { selectAll(); _selectOnMousePress = false; } qDebug() << selectedText(); } @
  • [SOLVED] How to initialize ui in the function?

    11
    0 Votes
    11 Posts
    9k Views
    M
    No problem! There aren't really many reasons to have functions outside your class for this sort of thing. So, keeping them in scope is easy in that sense! Please be sure and add a [Solved] to the beginning of the title of the thread if you feel like the problem is solved.
  • [SOLVED] QTcpServer max connection limit

    15
    0 Votes
    15 Posts
    11k Views
    G
    The original question was: [quote author="kalster" date="1312611841"]what is the maximum QTcpServer connection limit?[/quote] That basically boils down to the OS level and is more or less independent from the frameworks and/or patterns you put on top. The latter may help in speeding up the processing of the requests of course.
  • [Moved] Filter an image with an qRGB component.

    2
    0 Votes
    2 Posts
    2k Views
    D
    Moved to General and Desktop because it is Qt-related topic.
  • Dynamic Qt Translation?

    3
    0 Votes
    3 Posts
    2k Views
    M
    Hi Gerolf, I know the process but i have some other doubts, i will get back soon.
  • Segmentation Fault (Core Dumped)

    6
    0 Votes
    6 Posts
    6k Views
    V
    I am sorry I can't help bq. I ll do that., But might there be a chance of the VTK library built wrongly?? What might be the other possibilities why it failing? Look, I don't want to alarm you, but my colleagues experience setting vtk up is not good...
  • Licencing my App

    3
    0 Votes
    3 Posts
    2k Views
    kidproquoK
    Depending on the particulars of the open source licence encrypting parts of the binary could be in breach of the licence. Regardless of the technical aspects you could be heading for a world of problems with this approach.
  • Qpainter always print behind label

    4
    0 Votes
    4 Posts
    2k Views
    G
    Each widget (also a QLabel) has a background that is drawn onto the parent (e.g. your main window). You can reimplement each widgets paintEvent in a subclass and do your own painting there. If you overwrite the paintEvent of the main windwd, you draw behind each child, so behind the labels. If you want to change the labels, make a subclass of QLabel and use that instead of QLabel. Overwrite paintEvent in your QLabel subclass and draw there. If you want some main window image behind all labels, you could also make the labels transparent.
  • Script parser[solved]

    6
    0 Votes
    6 Posts
    2k Views
    D
    You are welcome, please add [solved] to your post title
  • [SOLVED]Want to expand QTextEdit ..

    3
    0 Votes
    3 Posts
    5k Views
    M
    Thanks Gerolf ...its working now..