Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Problem related to timer?

    3
    0 Votes
    3 Posts
    2k Views
    P
    thank you for your useful post i missed that
  • How to grab all keyPressEvent in nested widget app

    3
    0 Votes
    3 Posts
    2k Views
    U
    yeah thanks its working
  • Why are there no QWidget signals?

    15
    0 Votes
    15 Posts
    9k Views
    V
    Yes, I am sorry. I misinterpreted the documentation about signals and events. The fact is that I was looking for QWidget resize processing and stumbled on signals while looking. I can easily see how I thought signals to be the perfect solution for me despite the very second paragraph talking about inter-object communication and callbacks :P Reading the same documentation after your explanations really isn't the same experience any more :D Anyway, thanks for all the help.
  • How do not complete complete word by QCompleter?

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QMouseEventTransition not working?

    2
    0 Votes
    2 Posts
    2k Views
    M
    Just to be clear, when in line 9 I change "e.scenePos()" to "e.pos()", I got: @ PySide.QtCore.QEvent.Type.GraphicsSceneMousePress PySide.QtCore.Qt.MouseButton.LeftButton PySide.QtCore.QPointF(0.000000, 0.000000) True False @
  • What can be placed in a QListWidget?

    6
    0 Votes
    6 Posts
    4k Views
    T
    added: I created an additional empty Node constructor Node(); with the implementation: @Node::Node(): QObject(), QGraphicsItem() {}@ This removed some of the error, leaving the following: "QObject::QObject(const QObject&) is private within this context" "QGraphicsItem::QGraphicsItem(const QGraphicsItem&) is private within this context"
  • QIODevice::write and QByteArray

    11
    0 Votes
    11 Posts
    9k Views
    P
    I'm stupid. And i'm very sorry for wasting your time. In the form->getFilledForm( formsToFill.second ); i used QByteArray::fromRawData. With stack objects. And now i'm wondering what made me write QByteArray::fromRawData instead of just a QByteArray's constructor. And why did it work on Linux?
  • [SOLVED] Problem in writing text on QTableWidget using Qpainter.

    6
    0 Votes
    6 Posts
    4k Views
    M
    yes ...Ludde..i Draw the text within the QRect of my color...its working now... Andre..Actaully , i am drawing this text & BgColor using QStyledItemDelegate
  • Using quazip on mac

    9
    0 Votes
    9 Posts
    6k Views
    K
    thanks alot. it solved my problem
  • SQLite insert/updates slower in release mode?

    4
    0 Votes
    4 Posts
    3k Views
    L
    You may also want to make sure you're managing your transactions efficiently, placing a BEGIN...COMMIT around the bulk insert.
  • Displaying only *.txt files in open file dialog

    2
    0 Votes
    2 Posts
    8k Views
    L
    Remove the semicolon: @QString filename = QFileDialog::getOpenFileName(this,tr("Open Document"), QDir::currentPath(), tr("text files (*.txt)"));@
  • [Solved] Cannot get QuaZip (test) to work

    7
    0 Votes
    7 Posts
    12k Views
    G
    I was just struggling with QuaZIP build on Windows with VisualStudio 2010 and got the same problems. What I did: Used CMake 2.8 to configure QuaZIP and generate VS solution file; Tried to compile Debug and got missing 'zlib.h' problem; Added path to Qt copy of zlib (in my case "C:/Qt/4.7.4/src/3rdparty/zlib") to C/C++->General->Additional Include Directories; That fixed missing 'zlib.h' but then I got "error C2491: dllimport static" issue on QuaZipFile::staticMetaObject; Checked declaration of QuaZipFile -- it starts with "class QUAZIP_EXPORT QuaZipFile"; Searched for QUAZIP_EXPORT and found it in "quazip_global.h" -- it gets defined as either Q_DECL_EXPORT or Q_DECL_IMPORT based on whether QUAZIP_BUILD is defined or not; Checked preprocessor definitions for quazip project (C/C++->Preprocessor->Preprocessor Definitions" and found that QUAZIP_BUILD is not defined (it should be) -- instead there is a useless define "quazip_EXPORTS" which was probably supposed to be QUAZIP_BUILD but CMake configuration for VisualStudio is buggy; Got rid of quazip_EXPORTS and added QUAZIP_BUILD -- now at least Debug configuration builds! Haven't done the same change for other build configurations yet.
  • Added QMenuBar in QDialog it showing but sub menus dosn't open

    4
    0 Votes
    4 Posts
    6k Views
    M
    Use QMenu::AddMenu insted of AddAction in QMenu
  • Is it possible to batch text changes for undo/redo?

    8
    0 Votes
    8 Posts
    5k Views
    G
    The working cursor approach looks reasonable to me. BUT: be aware that if you start from the beginning you will change the document and the found and cached cursors are not updated and might point to false positions!
  • Qt::Drawer "user driven lose/hide" signal?

    3
    0 Votes
    3 Posts
    2k Views
    R
    hideEvent isn't called no event I can think of is called. The whole user-originated "drag-hiding" is simply done under the radar. No event is sent out that I can think of.
  • QScriptEngine embedded evaluate's and functions.

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Arrays And an error when trying to declare them

    16
    0 Votes
    16 Posts
    11k Views
    R
    [quote author="Volker" date="1317204423"]Read the "API docs":http://doc.qt.nokia.com/4.7/qcombobox.html and discover the "convenience methods":http://doc.qt.nokia.com/4.7/qcombobox.html#addItems. And subsequently avoid four-liners, where a one-liner is sufficient: @ AFC_North_ComboBox->addItems(AFC_North); @ [/quote] Yeah, either way, it's working, =).
  • QML drop Down Menu or Menu bar

    11
    0 Votes
    11 Posts
    16k Views
    C
    @Satmosc: thanks for reply. yes I will try my best to learn i am also from MS Studio background so that's why approach is like to get the thing in Straight forward. I am trying this to display the menu bar in qml for desktop application. and very few forums are on this issue..So waiting for your Source code ;-)
  • Order of signals on application quitting

    6
    0 Votes
    6 Posts
    8k Views
    P
    [quote author="fluca1978" date="1317204693"]And what if I leave the qApp.quit slot connected and perform the pre-exit behaviour in the main window destructor? I guess qApp will free memory on exit, so the destructor will be called anyway, right? Moreover I could set the Qt::WA_deleteOnclose attribute of the main window to force the deletion when the window is closed. Could it work?[/quote] I really think this should work. surely the object will be deleted on program exit, and I think each object destructor is called. Paolo
  • How to make cursor icon bigger

    2
    0 Votes
    2 Posts
    2k Views
    D
    Do that in your OS settings, or ship some custom cursors to use with QCursor and QWidget::setCursor / QApplication::setOverrideCursor / etc.