Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Removal of TWM frames

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Wobbling effect in a QLabel

    3
    0 Votes
    3 Posts
    2k Views
    J
    I had this idea in mind but found it a bit dirty :p
  • [Drag&Drop;] QTabWidget

    3
    0 Votes
    3 Posts
    3k Views
    B
    Thx for the answer. I think I'm going to this that way because I haven't found anything better yet. Could anybody say something about my last question?
  • How to use same action of the key across any widget in the application?

    2
    0 Votes
    2 Posts
    1k Views
    G
    You use a QAction with a QKeySequence and set the QActions "shortcut context":http://doc.qt.nokia.com/4.7/qaction.html#shortcutContext-prop
  • Not responding dialog

    8
    0 Votes
    8 Posts
    4k Views
    C
    [quote author="r@h@" date="1310724528"] @ AddContent *myAddContent=new AddContent; myAddContent->show(); this->close(); @ [/quote] You have some problems here. Where you delete the memory allocated for myAddContent ? And ... are you sure you want to close first dialog ? If you just want to hide call QWidget::hide() or QDialog::setVisible(false)
  • QDebug messages don'T appear in static library

    3
    0 Votes
    3 Posts
    3k Views
    L
    No, none of them...
  • When to start learning QT

    12
    0 Votes
    12 Posts
    4k Views
    Z
    Hi and welcome. Here is a very simple introductory "tutorial":http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial that walks you through a first Qt application project using Qt Creator (the best IDE ever)! As long as you have the basics of C++ under your belt, learning Qt should not be difficult. Some areas are more tricky than others or require some domain-specific knowledge (ie QtSql assumes some knowledge about SQL). If you encounter any specific problems then please ask on these forums and the community will do its best to help you resolve them. Good luck with your adventure!
  • Debugging in the Qt Event Loop?

    2
    0 Votes
    2 Posts
    6k Views
    L
    You could set a conditional breakpoint on "QCoreApplication::postEvent":http://doc.qt.nokia.com/latest/qcoreapplication.html#postEvent checking for receiver=0, event_type=0, etc. . If you need more information as to what exactly happened, you could have a look at "reverse debugging":http://www.gnu.org/software/gdb/news/reversible.html EDIT: fixed second link
  • How to add translation to Qt repository?

    5
    0 Votes
    5 Posts
    3k Views
    L
    AFAIK, all translation merge requests are always on the qt repository. However, you could ask the Qt developers via IRC at irc.freenode.net #qt-labs.
  • KGlobal::Locale Warning

    8
    0 Votes
    8 Posts
    6k Views
    L
    This problem was discussed before "here":http://developer.qt.nokia.com/forums/viewthread/7159 ,although no solution was found. However, I would suggest that you try debugging: From KGlobal.cpp @ 00173 // If you hit the warning below, here's how to debug it in gdb: 00174 // (gdb) set auto-solib-add on 00175 // (gdb) b qt_message_output 00176 // (gdb) run 00177 // It will stop at the "-nograb" information. 00178 // (gdb) b KLocalePrivate::KLocalePrivate 00179 // (gdb) c 00180 // And now it will stop at the first construction of the KLocale object, type bt or go up to find the 00181 // guilty i18n call. @
  • How to make the screen have a white flash?

    4
    0 Votes
    4 Posts
    2k Views
    A
    One second is a bit long perhaps though...
  • How to insert new data rows to QSqlQueryModel?

    2
    0 Votes
    2 Posts
    5k Views
    L
    "QSqlQueryModel":http://doc.qt.nokia.com/latest/qsqlquerymodel.html#details bq. The QSqlQueryModel class provides a read-only data model for SQL result sets. However, you can use a QSqlTableModel instead or insert the data to the database first or create your own QAbstractItemModel which incorporates a QSqlQueryModel and allows for adding rows
  • How better find class pointer by class name?

    7
    0 Votes
    7 Posts
    6k Views
    G
    [quote author="Maxim Prishchepa" date="1310458609"]I Have pointer to some class, then i need find some class(es) using this pointer(maybe current pointer is needed class, or parent pointer is needed class etc.) now i do that: @QMdiArea * mdi = NULL; QMainWindow * main = NULL; QObject * p = parent(); while(p != NULL){ QString str = p->metaObject()->className(); if(str == "QMdiArea"){ mdi = qobject_cast<QMdiArea *>(p); } if(str == "QMainWindow"){ main = qobject_cast<QMainWindow *>(p); } p = p->parent(); } if(mdi == NULL) return; if(main == NULL) return;@ [/quote] I would not use the class name to retreive this. JUst use a qobject_cast. If it returns 0, it did not fir. Then you are string compare free in your code (even qobject_cast does some internally...)
  • About paintEvent

    5
    0 Votes
    5 Posts
    4k Views
    G
    [quote author="qteruk" date="1310312780"] So, does it mean that the window system has stored the content when the window is obscured and then revealed ? Can I disable this ?[/quote] Hi, this is the so called double buffering of Qt. Qt has a pixel buffer for each top level widget and each widget draws to this buffer. After all widgets have finished their drawing, the double buffer is blitted to the screen which reduces flickeing and unnessacary repaints which always need calculation (clipping, etc). This feature can be disabled by some widghets attrinbutes, have a look at "QWidget::setAttribute":http://doc.qt.nokia.com/4.7/qwidget.html#setAttribute
  • Signals/Slots behavior review

    12
    0 Votes
    12 Posts
    6k Views
    C
    Lukas, thanks again. Your stuff is really good enough to create a wiki saving there.
  • [Proposal to Nokia/Qt] Create a "Qt Runtime"

    25
    0 Votes
    25 Posts
    13k Views
    T
    I voted yes. It has been said in the past in http://labs.qt.nokia.com/ that qt is going to be more modular. This purpose makes qt more modular.. Also i want to mention some benefits for the unix that something like this might have. Something like this (the proposal) can benefit distros which doesn't use binaries such as gentoo and slackware (they compile their binaries from the sources,a lot of time for Qt!) Also note that only KDE users and Qt programmers need the entire Qt,all the others,they just need some modules of it(Qt frameworks),why these users should install/compile the entire Qt. Don't take me wrong,but someone who needs just some Qt modules can blame the Qt frameworks that forces his to install in his system the entire Qt. Moreover,Qt is going to be more "open" (Qt 5),so proposals like these will not make Qt frameworks more windows friendly,(at least not with the bad meaning of it).Actually the otherwise will happen,more modular Qt means more Qt in windows systems,so when people will start searching for more (bigger) Qtish stuff they will come across to projects like KDE,meego which are of course unix friendly.:)
  • [solved]ProxyModel not working

    3
    0 Votes
    3 Posts
    2k Views
    P
    solved by myself... the problem was that I've omitted the const in the data() function signature, so superclass method was called. thanks anyway
  • Xml file to qml dynamic list

    3
    0 Votes
    3 Posts
    3k Views
    G
    sorry. i need it to be open when the user click on the element to show the children nodes it need to be shown as a tree model(but to load the data from the XML file only when the user ask for it)
  • [solved]Mapping a QComboBox displaying multiple columns

    3
    0 Votes
    3 Posts
    4k Views
    P
    what a wonderful thing I've discovered! =D thanks a lot
  • [Solved] Problem with QSignalMapper and QAction never triger the Slot

    9
    0 Votes
    9 Posts
    7k Views
    U
    ok ludde after looking again in my code and moving the QAction to set only once , its solved my problem Thanks