Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Several translation languages in same time

    3
    0 Votes
    3 Posts
    2k Views
    N
    Hi, Thanks for the reply. I will try in that case to make it with some temporary containers and playing with the load/unload of the languages... I'l keep update the thread if I have a good solution. Best regards, Nouch.
  • ToInt() doesn't work...

    3
    0 Votes
    3 Posts
    2k Views
    G
    Of which type is milliSec?
  • Problem with mouseMoveEvent

    3
    0 Votes
    3 Posts
    5k Views
    A
    thanks. (I thought ever QGraphicsSceneXXXX stuff is included in the QGraphicsScene header.)
  • [SOLVED] QItemDelegate and complex editor widgets loosing focus

    2
    0 Votes
    2 Posts
    3k Views
    S
    SOLVED: The reason the editor widget was loosing focus was because the QMenu object that was being created during the contextMenuEvent was not being constructed with a parent object defined. @c_menu = QtGui.QMenu(self)@ This ensures the editor widget maintains focus when the context menu is created.
  • Qmediaplayer demo problem on Windows?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    9 Posts
    3k Views
    U
    Finally ! Thanks Andre
  • [Resolved] Dynamically change style of control from loaded QSS file

    3
    0 Votes
    3 Posts
    3k Views
    R
    Yep: @style()->unpolish(theWidget); style()->polish(theWidget);@ Did the job. Thanks! (Although, as having polish ancestry, I object to the wording of the API ;-) )
  • How to open a file as binary

    5
    0 Votes
    5 Posts
    3k Views
    T
    [quote author="AcerExtensa" date="1327937473"]@file.open(QIODevice::Append)@ is the same as @fopen("fnmae","ab")@[/quote] Thank you !
  • QPropertyAnimation to Show a Widget(Visibility)

    2
    0 Votes
    2 Posts
    10k Views
    N
    bah soz abt the post. solved it myself (most of) @ QGraphicsOpacityEffect* fade_effect = new QGraphicsOpacityEffect(this); this->setGraphicsEffect(fade_effect); QPropertyAnimation *animation = new QPropertyAnimation(fade_effect, "opacity"); animation->setEasingCurve(QEasingCurve::InOutQuad); animation->setDuration(500); animation->setStartValue(0.01); animation->setEndValue(1.0); animation->start(QPropertyAnimation::DeleteWhenStopped); this->setVisible(true); @ Just the last 2 lines im not toally sure about yet if its ok to use like that. Just dont want to end up with a nasty flicker on some less powerful machine because of it.
  • Weird issue during the project building[SOLVED]

    16
    0 Votes
    16 Posts
    10k Views
    D
    Thank you very much! But what about the code inside of .zip? Could you, please, comment it? I mean, mainwindow.cpp and other guys, excluding first.cpp and first.h.
  • [SOLVED]Model/View read

    3
    0 Votes
    3 Posts
    1k Views
    T
    Yes I Used QSFPM and It worked just fine Thanks
  • Regarding reading version details from exe

    3
    0 Votes
    3 Posts
    2k Views
    G
    If you need the win API for versioninfo, have a look "at this thread":http://developer.qt.nokia.com/forums/viewthread/11377/
  • Small problem with QProcess output

    4
    0 Votes
    4 Posts
    2k Views
    G
    Sorry, I have absolutely no knowledge about tclsh and how it behaves. I can only give general advice here, and usually problems caused by "missing" stdout from a QProcess is caused by some buffering on the started process' side...
  • Help using QUdpSocket in blocking mode without an event loop

    3
    0 Votes
    3 Posts
    4k Views
    D
    Hi Yes, if you look at the code you will see that I have tried that. What I dont understand is a way to make writeDatagram behave like socket.h function sendto in blocking mode. Any help would be appreciated Regards
  • 0 Votes
    9 Posts
    7k Views
    L
    Singletons probably won't hit you immediately (except you are doing unit testing or multithreaded programming), but as with every bad design choice they involve a potential problem that might hit you at any time - with an increasing probability the lager a project becomes. And a global state, tight coupling and the violation of the single responsibility rule are huge problems when they become a problem. There are situations where singletons do make sense, but in 90% of cases singletons are just misused and they are used as a substitution for a global variable - and in the remaining 10% the classical singleton pattern can be most probably substituted with another singleton-like design pattern. In my humble opinion this fact alone qualifies them as an anti pattern. But enough of derailing this topic! :) Let's end it with a riddle: who said "When discussing which patterns to drop, we found that we still love them all. (Not really—I'm in favor of dropping Singleton. Its use is almost always a design smell.)"?
  • Making a checkbox in a QTableView useable?

    5
    0 Votes
    5 Posts
    8k Views
    S
    Thank you for pointing me in the correct direction, once I know the solution was found within the editorEvent(), I found this article that solves both my problem along with centering the checkbox. Very nice! "How can I align the checkboxes in a view?":http://developer.qt.nokia.com/faq/answer/how_can_i_align_the_checkboxes_in_a_view
  • 0 Votes
    2 Posts
    2k Views
    G
    For the types mentioned in the title (odt = Open Office, doc/docx = MS Word), there is nothing built into Qt. You will have to use external libraries that parse that file formats for you (or write them yourself).
  • Model\View Framework

    4
    0 Votes
    4 Posts
    3k Views
    S
    For those who want to solve the same problem, I have written a Wiki page with the code snippet "link":https://developer.qt.nokia.com/wiki/QSortFilterProxyModel_subclass_for_text_alignment_-and_readonly_columns. Thanks again Andre for the solution proposal. I hope the code I have written can evolve to some more complete class which can satisfy every user. Feel free to edit this Wiki page! (which by the way I don't know if it is possible) Seba84
  • [SOLVED] QGLContext::choose Context(): OpenGL 3.3 is not supported

    2
    0 Votes
    2 Posts
    3k Views
    Y
    I seem to have fixed this now - I was getting (and ignoring as I didn't think it was relevant and the code ran) the compile error: /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.so when searching for -lGL My project '.pro' file was missing '-L/usr/X11R6/lib64' in the 'LIBS =' line. When you create the Makefile (e.g. via 'Run qmake' in Qt-Creator) it creates a makefile with this library call in. You have to remove the existing '-L/usr/X11R6/lib' entry for the 32-bit libraries. It then appears to compile okay. It no longer produces the error mentioned above and the shaders compile. Apologies for the convoluted method - it would be better to change the default libraries used. I guess this is done via a different qmake '.conf' file, but I've not worked out how to find / change this via Qt Creator yet...
  • Model/View Framework

    5
    0 Votes
    5 Posts
    3k Views
    B
    Just making an modest observation for further improvement, as advised by Nokia itself... In fact, there wouldn't be so much to change. Right now there is already a beautiful mechanism, the stylesheet, that makes it possible to style some properties of a treeview, like the background color for example. So one possibility would be to extend these properties (with something like CSS selectors, allowing to select specific row and/or columns, and even items). For example I don't understand why it's not possible to set the text-align of a qtreeview via the stylesheet, while it is with some other widgets ? (or maybe it is, but I failed to find how). Otherwise I finally got the right way to "flash" a specific item, indeed subclassing itemdelegate, so if anyone is interested, just ask....