Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • Customized Widget no tab focus

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [Solved] Closing a dialog with a timer.

    16
    0 Votes
    16 Posts
    13k Views
    G
    I always tried so very helpful
  • GPGPU on Qt

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] QTableView - Resize of several columns

    11
    0 Votes
    11 Posts
    8k Views
    D
    You are welcome. Glad I could be of help.
  • How to place an widget over the desktop screen using qt

    10
    0 Votes
    10 Posts
    5k Views
    D
    thanks lukas right anwser
  • QTouchEvent Position Problem

    2
    0 Votes
    2 Posts
    2k Views
    A
    What about setPos(mapToParent(mapFromScene(touchPoint1.scenePos()))) ?
  • 0 Votes
    3 Posts
    3k Views
    S
    [quote author="GentooXativa" date="1334911842"]You enabled the opengl at your pro file?[/quote] @LIBS += -lqglviewer-qt4 -lGLU@ and @QT += core gui opengl xml glviewer@ Is that correct?
  • QSharedDataPointer and QSharedData compile problem

    4
    0 Votes
    4 Posts
    2k Views
    M
    Yes, it claims also about destructor will not be called. But when how to hide privat shared data. And Qt docs says that putting private shared data in seperate class is common use.
  • How to speed up Qt GUI based app launch speed ?

    3
    0 Votes
    3 Posts
    3k Views
    K
    [quote author="AcerExtensa" date="1334907144"]Linux pre-load method is to set environment variable LD_PRELOAD.[/quote] LD_PRELOAD is not exactly what I want .I want Qt libs be loaded into memory while the system boot ,LD_PRELOAD could not do this I think .
  • QPixmap fails in release

    2
    0 Votes
    2 Posts
    3k Views
    R
    you can use @ QList<QByteArray> QImageReader::supportedImageFormats () [static] @ to determine whether the necessary plugins have been loaded. You can print the result in a console or message box and you'll at least find out if there's a problem loading the image formats plugins.
  • [SOLVED] Cursor and image coordinates(problem with scaling)

    11
    0 Votes
    11 Posts
    17k Views
    A
    I post header and source file of my Image widget class before. So you can see it, mahdhaoui. You just need to make an empty qt solution and use my class :)
  • How does the QTimer work?

    11
    0 Votes
    11 Posts
    8k Views
    V
    Thanks Andre for the information - learnt a new thing today.
  • [SOLVED]about QSplitter collapse issue

    4
    0 Votes
    4 Posts
    7k Views
    R
    if you want to reverse the behaviour so that you can drag handle 3 (or 2 in your drawing) to the left, use something like this: @ void CMyWidgetW::SlotSplitterMoved(int iPos, int iIndex) { QList<int> sizeList = sizes(); if (2 == iIndex && 0 == sizeList[1]) { sizeList.clear(); sizeList << 0 << 0 << size().width(); pSplitter->setSizes(sizeList); } } @ sizeList contains the width for all the widgets contained within the splitter, ordered in a left-to-right fashion. So if you want to hide the leftmost widget, your first width in 'sizeList' has to be 0, the second size has to be 0 as well (since that's the one you've actually collapsed), and the last one has to span the whole width of the splitter (theoretically, you'd have to subtract the handle sizes).
  • QT and AT command for modem connected at port ttyUSB3

    4
    0 Votes
    4 Posts
    4k Views
    A
    Yes, you can. Look at "QProcess":http://doc-snapshot.qt-project.org/4.8/qprocess.html
  • QtSslSocket

    2
    0 Votes
    2 Posts
    2k Views
    S
    Swap in QSslSocket for QTcpSocket. For a secure connection, use connectToHostEncrypted instead of connectToHost. (unless you're negotiating encryption on an initially cleartext channel) On the server side, you can use QTcpServer, but convert the incoming connection to a QSslSocket rather than QTcpSocket. You'll need to use setLocalCertificate and setPrivateKey with your CA cert chain. To verify client certificates, use setPeerVerifyMode (default behaviour is clients verify server but server accepts any client) By default, the same set of CAs is trusted as provided by your operating system. Anyway read http://doc-snapshot.qt-project.org/5.0/qsslsocket.html and look at the examples
  • Unhandled Exception using QGLFunctions on Release mode only

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Setting text alignment of a QToolButton

    3
    0 Votes
    3 Posts
    10k Views
    M
    Well the thing is that I already have added a icon to the QToolButton, and the text is still centred. Also, my text is set to be under: @toolButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);@ I guess I have to have short button texts then... Thank you for your time!
  • Custom scroll bar for QTextEdit

    3
    0 Votes
    3 Posts
    11k Views
    A
    I think you have two ways of going: Subclass QScrollBar, and basically give it a second set of min and max properties. Use those properties instead of the default for interaction and rendering (at the very least you'll have to re-implement the drawing and mouse handling stuff for that). Then, set this scroll bar as the new scroll bar to use. Not easy. Alternatively, you could hide the original scroll bar of the text edit, and create a new one that you don't set on it. Instead, you use a of QSS (via the setStyleSheet method) to create a bit of padding inside the text edit. In that area you manually set your own QScrollBar. You will need to handle it's geometry manually, by using the resizeEvent of the text edit. You can then use the same methods as rschaub describes to manipulate the real scroll position. I think option 2 is much simpler to pull off.
  • QFontDatabase falls over in c++ library

    2
    0 Votes
    2 Posts
    2k Views
    T
    I found the problem. The SVG rendering part wants to get the "Arial" font from the QFontDatabase, and the QFontDatabase is not initialized. QFontDatabase is part of the QApplication, and QApplication handles the initialization of these things, according to the help on this page. http://qt-project.org/doc/qt-4.8/QApplication.html#details And i quote: QApplication's main areas of responsibility are: It initializes the application with the user's desktop settings such as palette(), font() and doubleClickInterval(). It keeps track of these properties in case the user changes the desktop globally, for example through some kind of control panel. The solution: Add a method to the library to initialize QApplication. @SYMGENAPISHARED_EXPORT void initLibrary() { QCoreApplication *app = QApplication::instance(); if(app == NULL) { app = new QApplication(0,NULL); } }@ The problem now is how do you release the memory when the shared library is not used any more?
  • How can I set the interval for mouse press detection ?

    4
    0 Votes
    4 Posts
    2k Views
    L
    Qt takes what it gets from the operating system. If you need a higher event rate you are therefore most probably out of luck, if you need a lower event rate you can do the event compression at least on your own.