Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Why qt creator stops to update the header file for the UI?

    10
    0 Votes
    10 Posts
    13k Views
    G
    Sorry, you just cut the actual error message. You must not change the ui_xxx.h files manually, as they are regenerated by uic for certain reasons. If you move out your own class definition into another header file, make sure you #include that file where you included the ui_xxx.h file have "include guards":http://en.wikipedia.org/wiki/Include_guard in that file and make sure they are different from the other one!
  • How to read xls.-files in qt?

    8
    0 Votes
    8 Posts
    8k Views
    G
    As already discussed in "this older thread":http://developer.qt.nokia.com/forums/viewthread/2144, there is no really good, out-of-the-box solution for this. You'll have to find your own workaround for that issue, sorry.
  • Problem in QListWidget item's renaming after executing a message box...

    3
    0 Votes
    3 Posts
    3k Views
    M
    I have QListWidget with 4 items inside. e.g., group1 group2 group3 group4 I can edit these items by pressing F2 button from the keyboard by placing the cursor on anyone of these items let say , if i try to change the 4th item from "group4" to "group1". My application will throw some error like "Name 'group1' already exist in this list" @ //i am getting the message using the following code QMessageBox msg; msg.setText(QString("Name").append(strName).append(" already exists in this list")); msg.exec(); emit editgroup(); // the corresponding SLOT is editlist() @ after throwing this error message , i want to have the same item as editable as i had before ..like when i press the F2 button from the keyboard....BUT ITS NOT OCCURING... :-( Even i am calling the SLOT editlist from the SIGNAL editgroup() ..after getting this messagebox @ connect( this, SIGNAL(editgroup()), this SLOT(editlist()); @ @ // this is the slot function. void testDlg::editList() { QListWidgetItem *item = ui->listWidget->currentItem(); item->setFlags( item->flags() | Qt::ItemIsEditable ); ui->listWidget->editItem( item ); } @
  • How to change color of the text cursor

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] Help on QListWidget's Event..

    3
    0 Votes
    3 Posts
    3k Views
    M
    Thanks for your valuable inputs.. DSav.. Its working fine...
  • Qt Custom closable windows

    5
    0 Votes
    5 Posts
    2k Views
    G
    But there are restirictions to the windows flags. Like if you want to have a system menu on windows, you (AFAIK) automatically get a close button. AFAIK you can change that on windows by reimplementing WM_NCXXX messages in the winEvent function of a widget...
  • 0 Votes
    7 Posts
    3k Views
    A
    [quote author="task_struct" date="1314781082"]@Cpowa, as I understand from Andres answer QGraphicsPolygonItem has a bounding rectangle and 0,0 is at its lower right corner. [/quote] Then you misunderstood my post. My point was, that (0,0) is not a fixed point for any item. It is just the origin of the coordinate system, but because you are allowed to use negative coordinates, the actual drawing of the item could happen anywhere relative to this point. You can make (0,0) the upper left or the lower right corner of your item, but you can also make it the center, or draw you item so that (0,0) is completely outside your item. Bottom line: (0,0) can be anywhere. It is another question whether it should, of course.
  • Mac (Cocoa) Command+A does not work with QFileDialog

    3
    0 Votes
    3 Posts
    3k Views
    S
    You can track the status of the bug "here":https://bugreports.qt.nokia.com/browse/QTBUG-8453.
  • How to delete an empty row in QTableWidget?

    5
    0 Votes
    5 Posts
    5k Views
    O
    Indeed, it should work. This snippet perfectly works for me : @ QTableWidget *table = new QTableWidget(2, 3, this); Q_ASSERT(table->rowCount() == 2); table->removeRow(1); Q_ASSERT(table->rowCount() == 1); @
  • Error Message - Could Not Decode [Solved]

    8
    0 Votes
    8 Posts
    16k Views
    M
    Be sure and edit the post title to add [Solved].
  • Qt executable file not working

    3
    0 Votes
    3 Posts
    2k Views
    O
    [quote author="Cayan" date="1314734115"]Which executable is not working then? This should be happening from a different executable that had been generated before.[/quote] My class in Qt Creator is called Wave. I have two files: "Wave" and "Wave-build-desktop". "Wave-build-desktop" was generated by Qt and the executable file called Wave.exe is in there. When i click on Wave.exe to open it, it opens the application window, but none of the push button are working and no items are displayed in the comboboxes. But when i navigate to this file in terminal and execute it from there, the application window pops up and everything works ok.
  • Saving index of QcomboBox[SOLVED]

    7
    0 Votes
    7 Posts
    6k Views
    M
    You do know that you don't have to put save and read code together, right? Volker's examples (settings and getting) were meant to be put in separate places in the code, not called one right before the other...
  • Qt Help Project XML link

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Edit line in .ini file from Qt Creator[SOLVED]

    9
    0 Votes
    9 Posts
    8k Views
    O
    Yes, thanks guys. Thanks mlong. I used QSettings. Solution: @void wave::on_addboardButton_clicked() { QMap<QString,double> map; QSettings settings("/home/test/Documents/Wave/signalgenerator.ini", QSettings::IniFormat ); settings.beginGroup( "values" ); foreach( QString childKey, settings.childKeys() ){ if (childKey.toInt() == ui->comboBox->currentIndex()+1) { int i = ui->comboBox->count(); i += childKey.toInt(); map[ QString::number(i) ] = ui->newCalNumberAdd->text().toDouble(); ui->comboBox->addItem("Board"+QString::number(i)); } QMapIterator<QString,double> it(map); while( it.hasNext() ){ it.next(); settings.setValue( it.key(), it.value() ); } } settings.endGroup(); }@
  • Getting screen information in both desktop and mobile

    3
    0 Votes
    3 Posts
    3k Views
    AlicemirrorA
    Many thanks! I think that this is sufficient.
  • [Moved] Support of Unicode hindi font

    2
    0 Votes
    2 Posts
    3k Views
    L
    I'm not that font expert but does a font embedded in the applications resources and "QFontDatabase::addApplicationFont()":http://doc.qt.nokia.com/latest/qfontdatabase.html#addApplicationFont not work?
  • QVTK and QGLViewer Difference!!

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    9 Posts
    6k Views
    G
    Problem is this code snippet: @     listButtons[grid_button]->setMinimumSize(QSize(grid_button_width, grid_button_height));     listButtons[grid_button]->setMaximumSize(QSize(grid_button_width, grid_button_height));     listButtons[grid_button]->setBaseSize(QSize(grid_button_width, grid_button_height)); @ The sizes of buttons and the spacing of layouts differ from platform to platform. You do set a fixed size, which will clash with the platform defaults.
  • When to delete QThread

    11
    0 Votes
    11 Posts
    16k Views
    L
    ... and what if I try: @ GestoreComunicazioneSatellite::~GestoreComunicazioneSatellite() { m_thread->exit(123); m_thread->deleteLater(); } @ ?
  • Can I Customize QTreeView this way?

    2
    0 Votes
    2 Posts
    3k Views
    D
    Yes, a delegate is definitely what you want. Subclass QStyledItemDelegate and do your custom painting there.