Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • [ RESOLVED ] New in 4.7.4: QDir::homePath() gives out empty string

    5
    0 Votes
    5 Posts
    3k Views
    G
    [quote author="ronM71" date="1315349947"]So, the "Clear system Environment" in Qt-Creator, causes those environment parameters to be "invisible" at runtime, for my system? If I deployed that same app on another machine, it would have been able to figure out the HOME string, right?[/quote] Yes, so it is. Instead of "Clear system Environment" you could just override it and reset or adjust the settings of some of the variables. Or just set the HOME variable to its original value (usually /Users/username on the Mac, with username being the short name, not the full name).
  • Defining the executable

    6
    0 Votes
    6 Posts
    2k Views
    R
    [quote author="sheehan1234" date="1315342002"] I started this new project through "Other project> C++ library". [/quote] So you are creating a library ,this way . Why dont you start with a console applicaiton ? EDIT : oops, bit late :( Didnt refresh the window for a while :(
  • Want to include MFC dialog in Qt application

    4
    0 Votes
    4 Posts
    7k Views
    A
    Thanks a bunch for the link. Will look into it.
  • Qt 4.7 Desktop application support for right-to-left UI (Hebrew)

    4
    0 Votes
    4 Posts
    4k Views
    S
    Qt has a valuable set of things that help people to develop RTL languages like Hebrew and Persian. You may want to load Hebrew translation of Qt itself. if you do so, you don't need to manually configure layout direction for each form in your application. When your program loads the translation, all directions will be automatically set to RTL. I was surprised when saw that new thing in Qt. I think developers should be able to manually set direction of each widget. but if you just want to set directions for your application try @QApplication::setLayoutDirection(Qt::LayoutDirection)@
  • [Solved] Error creating process when debugging - Qt Creator

    4
    0 Votes
    4 Posts
    5k Views
    L
    We have been on the moon for over four decades now but it is still rocket science to create a operating system which handles pathes with spaces correct - weird world, isn't it? ;-)
  • How to detect QMainWindow maximize?

    2
    0 Votes
    2 Posts
    3k Views
    L
    "QWindowStateChangeEvent":http://doc.qt.nokia.com/latest/qwindowstatechangeevent.html "QResizeEvent":http://doc.qt.nokia.com/latest/qresizeevent.html
  • QDataWidgetMapper and numbers issue

    8
    0 Votes
    8 Posts
    4k Views
    A
    [quote author="peppe" date="1315319386"]but why if a non-null QVariant::Int converts successfully into a QString, why doesn't a null QVariant::Int convert into a null QString?[/quote]It is kind of converted: any null QVariant can be converted to a null QString, or to an invalid/null value of any type it could be converted to if it wasn't null, but QVariant::convert will return false, indicating an error. QObject::setProperty just doesn't ignore that error.
  • MultiThreading - Sharing objects between threads without using events?

    6
    0 Votes
    6 Posts
    6k Views
    G
    Oh good to know that :) How can I use moveToThread() with QtConcurrent? Also, is it good practice to create the QTcpSocket with nextPendingConnection() in the new thread? Or is moveToThread a better option? Thanks
  • Location independent Qt libraries

    2
    0 Votes
    2 Posts
    2k Views
    L
    Have your customers to compile parts of the application themselves? Otherwise those hard-coded paths won't be much of an issue. As long as the dynamic linker can resolve the libraries anywhere your application will start up. In addition, qmakes -r option allows you to override hardcoded pathes in the binaries.
  • Debugging problem with gdb

    5
    0 Votes
    5 Posts
    3k Views
    S
    The problem is when i press F10 step by step, if i put a breakpoint and press f10 i receive this error. But if i put a breakpoint on every line (to simulate the f10) and press F5 (continue) all works well. So the problem is the pression of F10. Nobody have this problem?
  • [Moved & merged]Please define Qt versions and its SDK versions.

    16
    0 Votes
    16 Posts
    6k Views
    M
    Lukas thanks for the link it was very helpful. I suggested big picture of modules and Qt versions to present in a quick and graphical way how versions of modules and technologies(Qt Quick is technology, right?) are connected with main Qt version. I didn't mean all informations about given release, only connections between versions. It would be nice information and it does not do a lot of harm :). Nice feature would be to hover on given item and see additional informations, for example: Can be submitted to Ovi Store.
  • Using a custom database backend with QTableView

    15
    0 Votes
    15 Posts
    7k Views
    T
    I agree with you, Lukas, it's very nasty and I have no good reason for doing that. I'll follow your advices and change my mind. ;-) Thanks for your replies!
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • QTabWidget tabPosition west and text alignment horizontal

    6
    0 Votes
    6 Posts
    11k Views
    N
    I have reimplemented the paintEvent of QTabBar then i am able to change the text alignment to horizontal. But another question i also want to add space between two tabs which configurable property. i have added space by drawControl method in painting but when i add space then after that size of the tab decrease. what is the reason ?
  • [SOLVED] how to align textEdit to the tabwidget tab_3

    2
    0 Votes
    2 Posts
    2k Views
    K
    after 2 days searching the net, i finally discovered a solution by accident and shortly after i created this topic :). what i needed was the code below. @ QGridLayout *layout = new QGridLayout; textEdit->setParent(ui->tab_3); layout->addWidget(textEdit); ui->tab_3->setLayout(layout); textEdit->show();@
  • Toggle Checked state on a QTreeWidget

    5
    0 Votes
    5 Posts
    8k Views
    S
    Sure, so when I load a file I get the fileName and then call the insertFileName() function which is a function of the QTreeWidget subclass to have the name of the file listed in the tree as I load, This function is: @ void myTreeWidget::insertFileName(QString fileName) { int i = 0; bool full = true; QTreeWidgetItem* item = new QTreeWidgetItem(this); item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEditable |Qt::ItemIsEnabled | Qt::ItemIsSelectable); QString fName = withoutPath(fileName); QString stype = 'String'; while(full) { if(topLevelItem(i)) i++; else { item->setText(0, fName); item->setCheckState(0, Qt::Checked); item->setText(1, stype); insertTopLevelItem(i, item); setCurrentItem(item, 0); full = false; } } } @ So this loads the files fine but can't uncheck any of the loaded files. The point of being able to check or uncheck is that with that I want to update the display of my application so I need to be able to set checked (to make visible) or viceversa..
  • Wheel Event zooming QImage

    8
    0 Votes
    8 Posts
    7k Views
    X
    Thanks Ludde, this is really helpful!
  • ActiveQT and action/keyboard event

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Qt + Graph plotting on QFrame using QPainter+ rotation of QMainWindow

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • A Couple License and Copyright Questions

    7
    0 Votes
    7 Posts
    9k Views
    AlicemirrorA
    Thank you Galdarius, very useful. :)