Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QGraphicsView\QGraphicsItem render issues, help to optimize

    10
    0 Votes
    10 Posts
    7k Views
    P
    I read your original post again. I understand that your application creates maze elements once. It is possible to zoom and unzoom maze and slow down happens when elements count 515^2 makes view slow. I assume that 'maze element' size is creater than 1x1 pixels? Few things comes to my mind: You told that 2048x2048 takes 1.8GB RAM. How about good situation 256x256 when things seems to be ok? >> If computer starts swapping memory, it will cause some slowdown at least. What is your viewport update method (this may impact also your small artifact problem)? @setViewportUpdateMode(QGraphicsView::FullViewportUpdate);@ How do calculate your bounding rect in your custom QGraphicsItem? Are you using clippings etc in yor custom QGraphicsItem paintEvent? Check this "blog post":http://thesmithfam.org/blog/2007/02/03/qt-improving-qgraphicsview-performance/
  • QTableWidget update items.

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Exclude a module from compile in Qt5

    7
    0 Votes
    7 Posts
    4k Views
    S
    Before renaming, I changed contents of Makefile in qtwebkit directory and deleted everything leaving only three empty targets: release, debug and install. Then when compiling Qt Assistant, script failed at trying to find -lQtWebkit... In second try, seems to work fine Thanks
  • [SOLVED]Qt Widget Pointer to class

    5
    0 Votes
    5 Posts
    2k Views
    L
    You're welcome. Feel free to change your post title to '[Solved] ...' to indicate that your question has been answered and that there is a solution inside.
  • QSqlDatabase::tables(QSql::Tables) includes sqlite_sequence

    5
    0 Votes
    5 Posts
    3k Views
    A
    You convinced me that this is a peculiarity (bug?) of sqlite, not of Qt. I filed a bug-report suggesting a hint in the Qt documentation. See https://bugreports.qt-project.org/browse/QTBUG-28887
  • How can I set background color/image specific tab at QTabWidget?

    8
    0 Votes
    8 Posts
    9k Views
    C
    First, thanks for your reply Lukas, i was really on tenterhooks 1-) can i say that it is imppossible with qss ? 2-) out of style, how i achieve to point a random tab for other purposes ? 3-) and most important, where can i find a extensive proxymodel example ?
  • Keyboard shortcuts in a tooltip

    3
    1 Votes
    3 Posts
    2k Views
    I
    Hi, I meant like the Run and Start Debugging buttons. They show a nice looking gray keyboard shortcut after the main tooltip text. I was wondering if that's something that can be configured for any widget, or it's hardcoded into the tooltips in the creator. Thanks!
  • Recommended way to change the user interface at runtime

    4
    0 Votes
    4 Posts
    4k Views
    L
    The ownership of the widget is passed on to the QStackedWidget, so it is deleted once the QStackedWidget is deleted.
  • Qt 5 and Qt 4 compatibility (#include <QtWidgets>)

    5
    0 Votes
    5 Posts
    42k Views
    L
    @ #include <QtGui> #if QT_VERSION >= 0x050000 #include <QtWidgets> #endif @ The recommendation however is to not use the module prefix anymore (<code>#include <QApplication></code> instead of <code>#include <QtWidgets/QApplication></code>). It was never recommended to use module-wide includes (<code>#include <QtWidgets></code>).
  • SIGNAL AND SLOT

    5
    0 Votes
    5 Posts
    2k Views
    A
    thanks a lot. [quote author="Jake007" date="1356777920"]Yes. in your class @ class MyMainWindow : QMainWindow { //... public slots: void onSpinBoxChange(double var); // make sure that arguments are the same as in the signals method. //... }; void MyMainWindow::onSpinBoxChange(double var) { // Your code to execute when value is changed. } @[/quote]
  • Compiling Qt5 on Win64: much more problems than expected

    2
    0 Votes
    2 Posts
    2k Views
    JKSHJ
    Hi soroush, I haven't used D-Bus on Windows so I've always compiled Qt 5 without D-Bus support. If you want help with compiling D-Bus itself, you'll have better luck asking the D-Bus developers. Someone else was looking for Qt + D-Bus on Windows, but someone else warned that you might get strange and unexplained quirks on Windows: http://qt-project.org/forums/viewthread/20263 [quote author="soroush" date="1356638728"]After successfully configuring Qt5, I installed requirements (OpenSSL, ICU etc.)[/quote]Note: You'll need to install libraries BEFORE configuring, or Qt will be compiled without them.
  • Closing program with threads with the close bottom

    2
    0 Votes
    2 Posts
    1k Views
    JKSHJ
    Hello browser90, Have a look at the example under "QWidget::closeEvent()":http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#closeEvent Unfortunately, you can't cancel a thread started by QtConcurrent::run(). You could hide() your window, wait for the thread to finish, then quit your program.
  • Cant understand Signal Slot Syntax

    6
    0 Votes
    6 Posts
    2k Views
    C
    [quote author="hexenbrennen" date="1356901927"]qmake solved this why does this happen?[/quote] A vtable is a compiler generated internal table used to handle virtual functions in a class. If the class has no declared virtuals (not inherited) then a vtable is not generated. Blubber without the Q_OBJECT macro has no virtuals. Adding Q_OBJECT gives blubber some virtual function declarations that tie to code generated by moc. Until the moc code is generated and linked the now-required vtable is missing. Using the Q_OBJECT macro as a marker, qmake arranges Makefile entries to run moc. The Makefile does not have moc commands for the file if the marker is added after qmake is run. Re-running qmake regenerates the Makefile, and a subsequent make runs moc on the file, generates the code, and satisfies the missing linker names.
  • Get DOM (elemenet) content

    2
    0 Votes
    2 Posts
    1k Views
    A
    The HTML content is returned by QWebElement::toInnerXml() Is that code executed after the page is fully loaded (in a slot connected to the signal QWebView::loadFinished(bool))?
  • Phonon and bufferStatus signal.

    10
    0 Votes
    10 Posts
    3k Views
    O
    Thank you! You helped me a lot!
  • Full size QProgressBar in QTableWidget

    2
    0 Votes
    2 Posts
    2k Views
    G
    hi that's easy one! stretch the bar!!!!!! if u need the stretch's code ,,,, just ley me know
  • 0 Votes
    3 Posts
    3k Views
    W
    Hello. I'm sorry, but it's not QT, it's Qt. Also, why do you need this inheritence? Just make your class for main window, draw interface for it and then right-click on desired element and choose "Go to slot".
  • Printing Console output to Widget.

    7
    0 Votes
    7 Posts
    13k Views
    T
    The "Starting ..." line as well as the "... exited with code 0" are generated by Qt Creator. You can not get to that from anywhere in your application. You can intercept the rest using a messagehandler (see qInstallMsgHandler in the docs).
  • No Qt5 app will start after compilation with MSVC2012

    8
    0 Votes
    8 Posts
    3k Views
    N
    I found the problem. The environment variable QT_QPA_PLATFORM_PLUGIN_PATH has not been set, so plugins cannot be found. I think this topic should be closed. All Qt apps now run perfectly. Thank all you guys :)
  • No way to create localized list of country names?

    5
    0 Votes
    5 Posts
    4k Views
    F
    @MulderR That goes without saying. Obviously we're searching for a way that does not require human translators. QLocale internally has the needed data but somehow fails to address this use case. @Wilk I don't see how that class is relevant to this thread.