Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Unable to use new QTranslator::load() (Qt 4.8)

    5
    0 Votes
    5 Posts
    4k Views
    D
    Indeed, I should read the doc with eyes open ;-) This raises the following question: how to set manually fr_CA as the first language in this list from the shell? E.g. for testing purpose.
  • Q_object , signals , slots problem

    6
    0 Votes
    6 Posts
    3k Views
    D
    [quote author="ahura_24" date="1333867809"]why i must seprate header files ?[/quote] Not a must, but a good practice. If you do not want to seprate and the name of this file is "main.cpp" and the build tool your chosen is "qmake" , you need to add such a line @ #include "main.moc" @ in this file.
  • Debugging paint event = segmentation fault?

    4
    0 Votes
    4 Posts
    3k Views
    M
    Still sounds strange. Setting a breakpoint in the paint event may cause the program to stop a lot and not update, but not to crash. Maybe you can post a backtrace along with some snippets of your code?
  • 0 Votes
    3 Posts
    3k Views
    N
    Yeh Andre thats what is puzzling me too. but ill debug it further if that is the way you guys would approach it too. It seems for some reason that items with multiple lines only half the lines get painted until the entire item is visible. It was not like sizeHint returned incorrect values though cos the item had the correct size. It was just blank at the bottom until i scrolled to get full item visible and it paints itself correctly. In the paintEvent i did use painter->drawText with textoption flag than use QTextDocument drawContents to not have to recreate QTextDocument inside it again but maybe thats having some strange outcomes. will check further tomorrow and update.
  • What does Qt uses to render GUI ?

    6
    0 Votes
    6 Posts
    5k Views
    D
    Old X11 backend (aka. Xlib) has been dropped in Qt5, the default backend for linux is XCB, and wayland can be selected if your OS support it. Both Qt and GTK+ are ui toolkit, they are independent. GTK is now porting to wayland too.
  • Question about cross platform programming in Qt

    7
    0 Votes
    7 Posts
    3k Views
    D
    In fact, this is a pure C++ problem. As you can't compile your C++ program into one file and have it run on windows, mac, and Linux. However, if you using pure qml, there is another problem.
  • InitializeGL doesnt clear whole background

    6
    0 Votes
    6 Posts
    2k Views
    T
    You're welcome. Although it took relatively long for the problem to get solved ^^
  • QNetworkReply::setReadBufferSize still ignored

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Qt Libs error

    16
    0 Votes
    16 Posts
    9k Views
    M
    [quote author="1+1=2" date="1333671273"]What I mean is, write a cross-platform serialport application with GUI is rather easy too. But you have make an easy problem become complexed, as you get a platform special project file, and you want to compile it under another platform. Cross-platform examples can be found from google too. such as http://docs.qextserialport.googlecode.com/hg/1.2/examples-uartassistant.html[/quote] Thanks after I used part of this lib's example for made the project but I had to add a timer and a customizable filter for the output data.
  • Rounding up numbers

    6
    0 Votes
    6 Posts
    23k Views
    F
    That is actually what I want. But thanks a lot for the clarification. I love this forum! Thanks a lot
  • Longform of Qt

    7
    0 Votes
    7 Posts
    3k Views
    Y
    thNx Volker for this valuable info.
  • How to calculate the x value of the pixel based on scale changes

    8
    0 Votes
    8 Posts
    4k Views
    J
    The Value variable holds the position of the scroll bar. It varies from 0 to 99. The below code is present inside the HScrollbar value change event: QRectF sceneRect = plotScene->itemsBoundingRect(); plotScene->setSceneRect((value * ((sceneRect.width())/100)),0,600 ,350); If the ScrollBar position is 0, then the QGraphicsView should hold the QGraphicsScene data from the left edge of the GraphicsScene to the width of the view area. If the ScrollBar position is 99, then the QGraphicsView should hold the QGraphicsScene data from the right edge of the GraphicsScene to the width of the view area. Same kind of behavior, i am expecting for all scale levels. But it is not happening.
  • QPushButton over QGLWidget works wrong

    3
    0 Votes
    3 Posts
    2k Views
    A
    Ok, but how I accomplish that? How can I show the button over the GLWidget?? Has somebody an idea about that?
  • 0 Votes
    5 Posts
    5k Views
    A
    We're continuing this discussion in "this":/forums/viewthread/16199 topic. This topic is closed.
  • Qt QSqlDatabase ODBC and MySQL connection

    2
    0 Votes
    2 Posts
    3k Views
    A
    There is no need to recompile all of Qt to compile the MySQL driver. You can build it separately. That will result in a much faster connection with MySQL than via the ODBC driver. So, I would not recommend your approach.
  • Extending QLineControl

    4
    0 Votes
    4 Posts
    2k Views
    A
    If you think your needed changes are generic enough, you might also considder creating a patch for Qt itself, and contributing that back so others can use it as well in the future, and you don't have to maintain your own copy of QLineEdit and all that is needed for that for the indefinate future...
  • Qt QSqlQueryModel::setQuery control what display in in the column

    5
    0 Votes
    5 Posts
    4k Views
    A
    Hiding the data from the view does not stop you from using the data in other contexts...
  • Understanding code generated by Qt Designer

    4
    0 Votes
    4 Posts
    2k Views
    A
    Actually, uic normally produces a .h file, not a .cpp file... Note that qmake will make sure that the uic tool is called on all .ui files that you list in the FORMS section of your .pro file.
  • Best practices while creating a download manager

    3
    0 Votes
    3 Posts
    2k Views
    A
    All I get from your question, is that you want to write a download manager (who uses these things any more?!), but you have not the faintest idea of what that entails, as you need help on basically every step of the way. Perhaps you should re-think your goals?
  • Qsharedmemory problem

    2
    0 Votes
    2 Posts
    2k Views
    A
    Sorry, we're not here to debug your code. You're not even describing your symptoms...